Java if else

Ads
 

Java if else

The if-else statement is one of the widely used control flow statements while programming.

The if-else statement is one of the widely used control flow statements while programming.

Java if else

     

The if-else statement is one of the widely used control flow statements while programming. It lets the program execute a set of statements enclosed within the "if" block only if the certain condition evaluates to true otherwise program executes statements of "else" block. So it provides the facility to the programmer to handle the condition based programming.

Syntax for if-else:

if (booleanexpression)
{
/*Statements*/
}
else{
/*Statements*/
}

Read more at:

http:/www.roseindia.net/java/beginners/IfElse.shtml

 

Ads

Ads