A

Admin • 832.52K Points
Coach

Q. Which Map implementation is sorted and allows null values but not null keys?

  • (A) HashMap
  • (B) TreeMap
  • (C) LinkedHashMap
  • (D) EnumMap
  • Correct Answer - Option(B)
  • Views: 26
  • Filed under category Java
  • Hashtags: Java Map

Explanation by: Admin

TreeMap allows null values but not null keys if natural ordering is used.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.