Java Programming
primer-original-v2hardJavaAutoboxingInteger Cacheprimer-original-v2

What does the following output: Integer a = 127; Integer b = 127; System.out.println(a == b);

Answer options

A
true
B
false
C
Compile error
D
NullPointerException

Correct answer: true

Explanation

Quick AnswerThe correct answer is true because it directly addresses the core logic of Java Programming.

This question has been retained as-is due to its unique context.

Related Java Programming questions

Practice more Java Programming questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.