Java Reference
In-Depth Information
3. if-else-if ladder
Syntax with meaning
If(condition1)
{
Statements
// executed only if condition1 is true.}
else if (condition2)
{
Statements
// executed only if condition1 is true
}
.
.
.
else if (condition-n)
{
Statements // execute only when condition-n is true}
else
{
Statements
// executes when all above given conditions are false.
}
Statements
// these statements are always executed.
Search WWH ::




Custom Search