What will be displayed?

Integer a = 128;
Integer b = 128;
Integer c = -128;
Integer d = -128;
System.out.println(a == b);
System.out.println(c == d);
Explanation
Because the values from -128 to 127 fall into the Integer pool.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback