Multiple Choice
Consider the following code snippet: Map<String, Integer> scores;
You expect to retrieve elements randomly by key, and want fastest retrieval times. Which of the following statements will create a structure to support this?
A) scores = new HashMap<String, Integer>;
B) scores = new TreeMap<String, Integer>;
C) scores = new Map<String, Integer>;
D) scores = new TreeSet<String, Integer>;
Correct Answer:

Verified
Correct Answer:
Verified
Q38: Select an appropriate expression to complete the
Q39: What type of access does a LinkedList
Q40: You have decided to store objects of
Q41: Which of the following statements about manipulating
Q42: Select an appropriate expression to complete the
Q44: Which of the following statements about linked
Q45: Which of the following statements about the
Q46: Which of the following statements about manipulating
Q47: You need to access values using a
Q48: Assume that you have declared a map