Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJava== vs equalsSingle-choice MCQ

What does this code print?

String a = new String("x");\nString b = new String("x");\nSystem.out.println(a.equals(b));