Solved

Consider the Following Code Snippet: Map<String, Integer> Scores;

Question 67

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents