Control Statements in Java

The control statements, as the name suggests controls the flow of the program. Depending upon the state ( values of variables, user input etc ) the appropriate code is executed. These help in executing or by passing certain parts of the code, or executing them multiple times or skipping some lines of code etc.,.

These control statements in Java can be used together and they can be nested in one other. A program might contain multiple control statements, having them used in the same blocks of code or they can be nested. There is no limitation on the usage of these statements. The control statements in java are of following types :
Selection Statements In Java help in executing or by passing the code blocks. The supported statements are : if-else and switch
Iteration Statements Or Loops In Java help in executing a block multiple times. The supported statements are : while, do-while and for
Jump Statements In Java help in jumping or skipping certain parts of code. The supported statements are : break, continue and return.
Posted on by