A

Admin • 828.03K Points
Coach

Q. What is the return type of `putIfAbsent()` in ConcurrentHashMap?

  • (A) boolean
  • (B) void
  • (C) int
  • (D) V
  • Correct Answer - Option(D)
  • Views: 5
  • Filed under category Java
  • Hashtags: Java Map

Explanation by: Admin
`putIfAbsent()` returns the previous value associated with the specified key, or null if there was no mapping.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.