Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaInteger caching identitySingle-choice MCQ

What does this print, and what is the JVM-level reason for the result of the second comparison?

Integer a = 100; long b = 100L; System.out.println(a == b); Integer c = 100, d = 100; System.out.println(c == d);