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 ...
Get Java™ How To Program (Early Objects), Tenth 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.