A

Admin • 828.03K Points
Coach

Q. Which of these Set types allows null elements?

  • (A) HashSet
  • (B) TreeSet
  • (C) EnumSet
  • (D) None of these
  • Correct Answer - Option(A)
  • Views: 12
  • Filed under category Java
  • Hashtags: Java Set

Explanation by: Admin
HashSet allows one null element; TreeSet throws NullPointerException.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.