KnowledgeBoat Logo

Computer Applications

Explain the use of if control structure.

Java Conditional Stmts

ICSE

32 Likes

Answer

The if control structure is used to execute a statement or block of statements if the condition is true, otherwise it ignores the condition. The general syntax of if statement is as follows:

if (Boolean expression)  
{  
//Java statements  
..  
..  
}

Answered By

18 Likes


Related Questions