Control Flow in Java

Lessons in this section

  1. Conditional Statements

    Make decisions in Java with if, if-else, else-if ladders, nested conditions, combined conditions, the ternary operator and switch.

  2. Loops

    Repeat code with for, while and do-while loops, nest loops, control them with break and continue, and avoid infinite loops.

  3. Methods

    Write and call Java methods with parameters and return values, overload them, use static and instance methods, varargs and recursion, and see how pass by value works.