Pull to refresh
0
0
Send message

Integer iOb1 = 100;
Integer iOb2 = 100;
System.out.println(iOb1 == iOb2);


Integer iOb3 = new Integer(120);
Integer iOb4 = new Integer(120);
System.out.println(iOb3 == iOb4);


Integer iOb5 = 200;
Integer iOb6 = 200;
System.out.println(iOb5 == iOb6);


Ответ: в первом случае — true, во втором и третьем — false


А в чем разница между 1 и 3 случаями?

Information

Rating
Does not participate
Registered
Activity