class Main{
public static void main(String[] argu){
//we simply compair 2 values which we define here
int a = 30;
int b = 30;
//use of if else condition also nested condition
if(a > b){
System.out.println("A is Greater then B");
}
else if(a < b){
System.out.println("B is Greater then A");
}
else{
System.out.println("Both are Equal");
}
}
}
0 Response to "If-Else Condition in Java"
Post a Comment