Java programming language provides following types of decision making or branching statements.
Java programming language provides following types of decision making statements.
|Statement & Description|
An if statement consists of a boolean expression followed by one or more statements.
An if statement can be followed by an optional else statement, which executes when the boolean expression is false.
|3||nested if statement|
You can use one if or else if statement inside another if or else if statement(s).
A switch statement allows a variable to be tested for equality against a list of values.