Skip to content
Hard Java Core

What is the output of: String a = "hello"; String b = "hello"; System.out.println(a == b);

— Tests your understanding of this concept.

Answer Options

A true
B false
C Compilation error
D Runtime exception

Want to see the correct answer?

Get the answer with a detailed explanation, plus practice 20+ more Java Core questions with adaptive quizzes and timed interviews.

See the Answer on Guru Sishya →

This question is from the Java Core topic (Programming Languages).

More Java Core Questions