A

Admin • 802.91K Points
Coach

Q. Which method is used to add an element to a Set?

  • (A) put()
  • (B) insert()
  • (C) add()
  • (D) push()
  • Correct Answer - Option(C)
  • Views: 3
  • Filed under category Java
  • Hashtags: Java Set

Explanation by: Admin
The `add()` method is used to insert elements into a Set.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.