Skip to main content
๐Ÿ”ฎ Output PredictionJV Java Hard+35 XP

Integer Caching

What does this comparison return?

Java
Integer a = 127;
Integer b = 127;
Integer c = 128;
Integer d = 128;
System.out.println(a == b);
System.out.println(c == d);

๐Ÿ”ฎ What is the output?

Priygop - Leading Professional Development Platform | Expert Courses & Interview Prep