Java – Control statements :
- The JAVA control statements inside a program are usually executed sequentially. Sometimes a programmer wants to break the normal flow and jump to another statement or execute a set of statements repeatedly. The statements which breaks the normal sequential flow of the program are called control statements.
- Control statements enables decision making, looping and branching.
Decision making statements:
These statements decides the flow of the execution based on some conditions.
- If then
- If then else
Statements inside a loop are executed repeatedly provided with some condition which terminates the loop.
- do while
Branching statements are used to jump from the current executing loop.