1.

Which of these methods can be used to obtain set of all keys in a map?(a) getAll()(b) getKeys()(c) keyall()(d) keySet()

Answer» The correct option is (d) keySet()

To explain I would say: 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.


Discussion

No Comment Found

Related InterviewSolutions