java.lang.Integer.equals()


java.lang.Integer.equals()

package com.codingdict;



import java.lang.*;



public class IntegerDemo {



   public static void main(String[] args) {



      Integer obj1 = new Integer(75);

      Integer obj2 = new Integer(75);

      System.out.print("Is obj1 and obj2 equal ? ");

      System.out.println(obj1.equals(obj2));



      obj1 = new Integer(32);

      obj2 = new Integer(26);

      System.out.print("Is obj1 and obj2 equal ? ");

      System.out.println(obj1.equals(obj2));

   }

}