Topics Index

Control Statements >
Siva Nookala - 11 Apr 2016
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 :
  • Jump Statements In Java help in jumping or skipping certain parts of code. The supported statements are : break, continue and return
Visit the above links for more details about control statements. Control-statements-airport-example As shown in the above airport example, the following controls are used.
  • Whether to take the wheel chair or not
  • Doing baggage scan of multiple baggage or suit cases
  • Returning back, if the flight is full
  • Removing insecure items at security check
  • Going to the appropriate gate group and then to the gate

Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App