A

Admin • 828.43K Points
Coach

Q. What will happen if you add duplicate values to a Set?

  • (A) They are added
  • (B) Error is thrown
  • (C) They are ignored
  • (D) They are replaced
  • Correct Answer - Option(C)
  • Views: 14
  • Filed under category Java
  • Hashtags: Java Set

Explanation by: Admin
Sets ignore duplicate values and keep only unique elements.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.