The statement of a java program will be executed in sequential order. If we don’t want to execute the statements in sequential order i.e. if we want to execute the statements in random order according to programmer choice, then we take the help of control statements.
The control statements will help the programmer tp control the flow of execution in a java program. The control statements are classified as following
1) Conditional Statements
1.1 if else statements
1.2 switch statements
2) Iterating statements
2.1 for loop
2.2 while loop
2.3 do-while loop
2.4 for each loop
3) Transfer statements
3.1 break
3.2 continue
3.3 return