Java program to compare a number using if else

In this program we are going to compare a number using if else...

//Comparing a number
public class IfElse2{
public static void main(String args[]){
int a=10;
if(a>11){
     System.out.println(" a is greater thatn 11");
       }
  else{
     System.out.println("a is smaller than 11");
     }
}


No comments:

Post a Comment