MCQs > IT & Programming > Java > Which is true about this Java snippet: String a = 'hello'; String b = 'hello'; boolean x = (a == b);

Java MCQs

Which of the following is true about this Java snippet: String a = "hello"; String b = "hello"; boolean x = (a == b);

Answer

Correct Answer: x can be true because of Java String interning.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it