A

Admin • 828.70K Points
Coach

Q. Which method in the Map interface is used to remove a mapping only if the key is mapped to a specific value?

  • (A) remove()
  • (B) removeIfMatch()
  • (C) conditionalRemove()
  • (D) remove(key, value)
  • Correct Answer - Option(D)
  • Views: 14
  • Filed under category Java
  • Hashtags: Java Map

Explanation by: Admin
`remove(key, value)` removes a mapping only if the key maps to the given value.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.