public static void main(String[] args) {
Long lo = new Long(1);
Integer a = new Integer(1);
int aa = 1;
System.out.println(lo.equals(a)); //false
System.out.println(lo==aa); //true
System.out.println(lo==a); //编译错误
}
public static void main(String[] args)
{
Long lo = new Long(1L);
Integer a = new Integer(1);
int aa = 1; System.out.println(lo.equals(a));
System.out.println(lo.longValue() == aa);
}