Java Reference
In-Depth Information
Chapter 3:
Decision Making Statements in Java
Sometimes there is a need to take decisions on the basis of given condition. Based on
the given conditions, it is the decided that which condition is satisfied and statements
corresponding to that conditions is executed.
There are mainly three types of decision making statements in Java
1.
If statement
2.
switch statement
3.
conditional operator statement
If statement is further implemented as
Simple if statement
If-else statement
If-else Ladder
Nested if -else statement