Self-Review Exercises
16.1 Fill in the blanks in each of the following statements:
a) A(n) _________ is used to iterate through a collection and can remove elements from the collection during the iteration.
b) An element in a List can be accessed by using the element’s _________.
c) Assuming that myArray contains references to Double objects, _________ occurs when the statement "myArray[0] = 1.25;" executes.
d) Java classes _________ and _________ provide the capabilities of arraylike data structures that can resize themselves dynamically.
e) If you do not specify a capacity increment, the system will _________ the size of the Vector each time additional capacity is needed.
f) You can use a(n) _________ to create a collection that offers only ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access