Java program to check equality of number using if else

In this program we are going to check equality of the number using if else... 

//checking number equality 

public class IfElse1{
public static void main(String args[]){
int a=10;
if(a==10){
System.out.println("The value is "+a);
     }
else{
  System.out.println("a is not equal to "+a);
       }
}
}


No comments:

Post a Comment