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);
Because the values from -128 to 127 fall into the Integer pool.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Sign Up Now
or Subscribe for future quizzes