Statements in java source code generally executed from top to bottom, in the order they appear. However, with control-flow statements, that order can be interrupted to implement decision making, branching or looping so that the Java program can run particular blocks of code based on certain conditions. Control flow statements categorize as below:
- Decision-making statements: if-then, if-then-else, if-else-if,switch
- Looping statements: for, while do-while
- Branching statements: break, continue, return
See Also: Type of Statements in Java