public boolean equals(Object obj) { return (this == obj); }
public class Equa { private Integer t; private Integer k; public Equa() { t=new Integer(12); k=new Integer(12); System.out.println(t.equals(k)); } public static void main(){ new Equa(); } }
public boolean equals(Object obj) { if (obj instanceof Integer) return intValue() == ((Integer) obj).intValue(); return false; }