16.6.1 ArrayList and Iterator
Figure 16.2 uses an ArrayList
(introduced in Section 7.16) to demonstrate several capabilities of interface Collection
. The program places two Color
arrays in ArrayList
s and uses an Iterator
to remove elements in the second ArrayList
collection from the first.
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.