Starlit Daily

📚 › Java

3. Conditions and loops

Java uses if, else and switch for decisions, and for and while for loops. The syntax is close to JavaScript.

Show example

for (int i = 1; i <= 3; i++) {
  System.out.println(i);
}

← Back to course