Sail E0 Webinar
Question
Which of these methods can be used to obtain set of all keys in a map?
Options:
A .  getAll()
B .  getKeys()
C .  keyall()
D .  keySet()
Answer: Option D


keySet() methods is used to get a set containing all the keys used in a map. This method provides set view of the keys in the invoking map.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers