branching statement in Java


Java programming language provides following types of decision making or branching statements.

Java programming language provides following types of decision making statements.



Sr.No.

Statement & Description
1if statement
An if statement consists of a boolean expression followed by one or more statements.
2if...else statement
An if statement can be followed by an optional else statement, which executes when the boolean expression is false.
3nested if statement
You can use one if or else if statement inside another if or else if statement(s).
4switch statement
A switch statement allows a variable to be tested for equality against a list of values.


Updated on: 30-Jul-2019

415 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements