Control Statements in Java

Previous
Next

Control Statements:

  • Statement is a line of code in java program.
  • Every statement in java contains expressions.
  • Expressions build with operands (variables), operators, values, method calls…..
  • Statements execution can be either Sequential or Control.

Sequential statements: These statements execute one by one from top down approach.

Control statements: Statements execute randomly and repeatedly depends on the specified conditions.

  • Conditional control statements (if, if-else, if-else-if , nested-if  and switch)
  • Loop control statements (do-while, while and for)
  • Transfer control statements (break, continue, return and exit)
Previous
Next

Add Comment

Courses Enquiry Form