Roadmap to becoming a developer in 2022
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

554 B

Loops

In Java and other programming languages, loops are used to iterate a part of the program several times. There are four types of loops in Java, for, forEach, while, and do...while.

  • Syntax of for loop is for(initialization;condition;increment/decrement){}
  • Syntax of forEach loop is for(data_type variable:array_name){}

Visit the following resources to learn more: