R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which method in Map returns a Set of all keys?

  • (A) entrySet()
  • (B) getKeys()
  • (C) keySet()
  • (D) keys()
  • Correct Answer - Option(C)
  • Views: 14
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma

`keySet()` returns a `Set` view of the keys contained in the map.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.