Thursday, March 12, 2015

If Else If statement in java pgm



If Else If statement

public class IfElseIfElseExample
{
public static void main(String[] args)
{
int i = 10;
if(i > 100)
System.out.println("i is grater than 100");
else if(i > 50)
System.out.println("i is grater than 50");
else
System.out.println("i is less than 50");
   }
}

No comments:

Post a Comment