Syntax error branching statement in Java

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
1 if statement
An if statement consists of a boolean expression followed by one or more statements.
2 if...else statement
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).
4 switch statement
A switch statement allows a variable to be tested for equality against a list of values.


Updated on: 2019-07-30T22:30:22+05:30

728 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements