hiexam
oracle · 1z0-808 · Q603 · multiple_choice · topic_1

Given the code fragment: //IMG// What is the result?

Given the code fragment: //IMG// What is the result?
  • A.Match 1
  • B.Match 2
  • C.No Match
  • D.A NullPointerException is thrown at runtime.
Explanation
sb.toString() => converts it into String. and thereafter, using equals() method on String will do the value comparison. So, answer is A since the values are equal.

Reference: examtopics_top_comment

Practice with progress tracking

Sign in to track wrong answers, get spaced-repetition reminders, and run timed exam mode.