Answers to Self-Review Exercises

19.1
  1. Iterator.

  2. index.

  3. sequences.

  4. ArrayList, Vector.

  5. double.

  6. unmodifiable wrapper.

  7. LinkedLists.

  8. disjoint.

19.2
  1. False; a Vector stores only objects. Autoboxing occurs when adding a primitive type to the Vector, which means the primitive type is converted to its corresponding type-wrapper class.

  2. False. A Set cannot contain duplicate values.

  3. False. A Map cannot contain duplicate keys.

  4. True.

  5. False. Collections is a class; Collection is an interface.

  6. True.

  7. False. With hashing, as the load factor increases, fewer slots are available relative to the total number of slots, so the chance of selecting an occupied slot (a collision) with a hashing operation increases.

  8. False. A NullPointerException is thrown if the program attempts to ...

Get Java™ How to Program, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.