Chapter 16 Review Flashcards
Iterator
An object that iterates through a collection and can remove elements from the collection during the iteration
An element in a list can be accessed by using the elements
index
Autoboxing
The automatic conversion of a value of primitive type to an object of the corresponding type-wrapper class
Unboxing conversion
The automatic conversion of an object of a type-wrapper class to the equivalent primitive type
What two data structures in Java provide array like storage but can be resized dynamically.
ArrayList and Vector
You can use a(n) ___________ to create a collection that offers only read-write access to yourself
un-modifiable wrapper
Assuming that myArray contains references to double objects, ________________ occurs when the statement “double number = myArray[0];” executes.
Auto - Unboxing
The algorithm ____________ determines if two collections have elements in common.
disjoint
Values of primitive types can be stored in collections
false
A Set can contain duplicate values
false
A map can contain duplicate keys
false
A linked list can contain duplicate values
true
A collection is a interface
false (Collections is a class; Collection is an interface)
Iterators can remove elements
true
With hashing, as the load factor increases the chance of collision decreases
false