Flow Control Statements

 Flow Control Statements

  • These statements are to control the flow of the program. 
  • By using these statements, we can get the required output easily.

Types of flow control statements:
  • Conditional Statements
  • Looping Statements
  • Jump Statements

Conditional Statements:

Used to control the flow of the program by using conditions
  • if
  • if-else
  • nested if
  • if-else-if ladder
  • switch

Looping Statements:

Used to run the set of code / a block repeatedly until the condition is false
  • while
  • do-while
  • for
  • for each

Jump Statements:

Used to skip or break the iteration or to exit the block
  • continue
  • break

Comments

Popular posts from this blog

Constructors in java