Files
developer-roadmap/src/data/roadmaps/java/content/100-java-fundamentals/107-loops.md
T
2023-03-30 01:23:01 +01:00

537 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.

  • Synatx 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: