KnowledgeBoat Logo

Computer Applications

Explain the following statement with their constructs:

if - else - if

Java Conditional Stmts

74 Likes

Answer

if - else - if ladder construct is used to test multiple conditions and then take a decision. It provides multiple branching of control. It has the following syntax:

if (condition)
    statement;
else if (condition) 
    statement;
else if (condition) 
    statement;
..
..
else
    statement;

Answered By

45 Likes


Related Questions