Collections
- Which of these methods can be used to obtain set of all keys in a map?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
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.
- Which of these classes provide implementation of map interface?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
AbstractMap, WeakHashMap, HashMap and TreeMap provide implementation of map interface.
- Which of these method is used to remove all keys/values pair from the invoking map?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
remove()
- Which of these method Map class is used to obtain an element in the map having specified key?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
get()
- Which of these object stores association between keys and values?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Map