Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Questions Answers (select one) What replaces in the code below: HashMap map=new

ID: 3847083 • Letter: Q

Question

Questions Answers (select one) What replaces in the code below: HashMap map=new HashMap (); What replaces (???) in the code below for adding a city and population pair into this collection map.out(???); ("Seattle "WA") ("Seattle") ("Seattle" 724000) (704000 "WA") (704000) Assume that the populations all US cities are added to the above map collection. If all the keys in this nap are retrieved, they will be: A List An Interface A Hash A Stack A Set If a TreeMap collection is used instead of HashMap for this collection which of the following best describes this change? TreeMap cannot be used for storing cities & populations TreeMap is faster and keys are sorted TreeMap is slower and keys are sorted TreeMap is faster and keys are unsorted e TreeMap is faster and keys are unsorted

Explanation / Answer

A. Hashmap<Integer, Stringr> map= new hashmap <Integer, String>();

B. map.out(70400,"WA");

C .all the keys in this map are in Hash

D. TreeMap is slower and keys are Sorted.