Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Reference in java equal operator

public class Demo{
    public static void main(String[] arr){
        Integer num1 = 100;
        Integer num2 = 100;
        Integer num3 = 500;
        Integer num4 = 500;
          
        if(num1==num2){
            System.out.println("num1 == num2");
        }
        else{
            System.out.println("num1 != num2");
        }
        if(num3 == num4){
            System.out.println("num3 == num4");
        }
        else{
            System.out.println("num3 != num4");
        }
    }
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Reference #java #equal #operator
ADD COMMENT
Topic
Name
5+2 =