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.
Java Quiz
Start Quiz

or Read more about Java Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback