A

Admin • 828.03K Points
Coach

Q. What does Set's `equals()` method check?

  • (A) Whether order and values match
  • (B) Only if objects are same
  • (C) Whether both Sets contain the same elements
  • (D) Whether Sets have same memory reference
  • Correct Answer - Option(C)
  • Views: 7
  • Filed under category Java
  • Hashtags: Java Set

Explanation by: Admin
equals() returns true if two Sets contain the same elements, regardless of order.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.