Control Structures in Java
Control Structures in Java
- allow us to change the ordering of how the statements in our programs are executed
● Decision Control Structures - which allow selection of specific sections of code to be executed
- if
- if-else
- if - else if
- switch
● Repetition Control Structures – which allow executing specific sections of code a number of
times
- while
- do-while
- for
● Branching Statements – which allow redirection of program flow
- break
- continue
- return
Syntax and Examples