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.getKeySet() ; for (String key : keySet) {...}
B) Set<String> keySet = myMap.keySet() ; for (String key : keySet) {...}
C) Set<String> keySet = myMap.keys() ; for (String key : keySet) {...}
D) Set<String> keySet = myMap.getKeys() ; for (String key : keySet) {...}
Correct Answer:

Verified
Correct Answer:
Verified
Q89: To create a TreeSet for a class
Q90: You need to access values by an
Q91: When using a list iterator, on which
Q92: A _ is a data structure used
Q93: Consider the following code snippet: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TB7392/.jpg"
Q95: A collection that allows speedy insertion and
Q96: Which of the following correctly declares a
Q97: Which operations from the list data structure
Q98: Assume that you have declared a map
Q99: Consider the following code snippet: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TB7392/.jpg"