Что будет выведено на экран?

Integer a = 128;
Integer b = 128;
Integer c = -128;
Integer d = -128;
System.out.println(a == b);
System.out.println(c == d);
Explanation
Т.к. в Integer pool попадают значения от -128 до 127

Follow CodeGalaxy

Mobile Beta

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