A

Admin • 828.70K Points
Coach

Q. What happens when you call clear() on a Map?

  • (A) It deletes only keys
  • (B) It deletes only values
  • (C) It deletes all entries
  • (D) Nothing happens
  • Correct Answer - Option(C)
  • Views: 8
  • Filed under category Java
  • Hashtags: Java Map

Explanation by: Admin
`clear()` removes all key-value pairs from the Map.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.