branching statement in Java

Java Programming Java8Java Technologies Object Oriented Programming

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.


raja
Published on 23-Apr-2018 13:17:34
Advertisements