B 4.1.6 Worksheet 1 Java Answers
1. Definitions 2. Java HashMap 3. Thinking Question A HashMap is better because you can look up a price directly by the product's name (the key) using the .get() method. In an ArrayList, you would have to loop through the list to find the product first, which is much slower.