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?