JAVA – Condition (Decision-making) Statements


Unlike the sequential statements, the Control flow statements enable execution of parts of a code only, based on a particular condition. These control flow statements enable decision making on the program. The common decision-making statements that we use in different Java programs are:

  • if statement
  • if-else statement
  • if-else-if statement
  • Nested if statement
  • Switch

We will look at each of these statements in detail.