For two different String objects with same characters, .equals() can return true.

Practice this question from Quiz: Sorting and String Checks, with options and an explanation.

Question

For two different String objects with same characters, .equals() can return true.

Option A — Correct answer

True

.equals checks character content; == checks object references.

Option B

False

.equals checks character content; == checks object references.

Quiz: Sorting and String Checks

All questions · Previous question · Next question

Open on QuizMaker