Java Control statements control the order of execution in Java program.
In Java, we can divide control statements into the following three categories.
- Selection Statements
- Iteration Statements
- Jump Statements
Selection statements allow us to control the flow of the program execution on the basis of an expression or state of a variable come under runtime.
Below are the different categories of selection statements:
- The if statements
- The if-else statements
- The if-else-if statements
- The switch statements