Advertisement



< Prev
Next >


If-else Statement





In if-else statement, the condition in the parenthesis of if is evaluated for a boolean value - true or false.




Advertisement




if else example


 //if else example

public class IfElse
{

public static void main(String... ar)
{
if(100<50)
	System.out.println("100 is less than 50");
else
	System.out.println("100 is greater than 50");
}

}


  


Output -

100 is greater than 50 


Please share this article -





< Prev
Next >
< If Statement Block
Else-If Statement>



Advertisement

Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page




Advertisement



Notifications



Please check our latest addition

C#, PYTHON and DJANGO


Advertisement