A

Admin • 831.35K Points
Coach

Q. Which Map implementation is sorted and synchronized?

  • (A) TreeMap
  • (B) ConcurrentHashMap
  • (C) Collections.synchronizedMap(new TreeMap<>())
  • (D) LinkedHashMap
  • Correct Answer - Option(C)
  • Views: 19
  • Filed under category Java
  • Hashtags: Java Map

Explanation by: Admin
`Collections.synchronizedMap()` can wrap TreeMap to make it thread-safe.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.