Java tutorial
public class Main { public static void main(String[] args) { Integer obj1 = new Integer(5); Integer obj2 = new Integer(5); System.out.println(obj1.equals(obj2)); obj1 = new Integer(3); obj2 = new Integer(2); System.out.println(obj1.equals(obj2)); } }