Multiple Choice
You want to enumerate all of the keys in a map named myMap whose keys are type String. Which of the following statements will allow you to do this?
A) Set<String> keySet = myMap.keySet() ;
For (String key : keySet) {. . . }
B) Set<String> keySet = myMap.getKeys() ;
For (String key : keySet) {. . . }
C) Set<String> keySet = myMap.keys() ;
For (String key : keySet) {. . . }
D) Set<String> keySet = myMap.getKeySet() ;
For (String key : keySet) {. . . }
Correct Answer:

Verified
Correct Answer:
Verified
Q100: Complete the following code snippet, which is
Q101: We might choose to use a linked
Q102: Complete the following code, which is intended
Q103: A collection that allows items to be
Q104: Assume that you have declared a stack
Q105: You need to write a program to
Q106: A collection that remembers the order of
Q107: Which data structure would best be used
Q108: Suppose you push integer elements 1,2,3,4 onto
Q109: Assume that you have declared a map