4.4. ArrayList

[9.4] Declare and use an ArrayList of a given type

In this section, I’ll cover how to use ArrayList, its commonly used methods, and the advantages it offers over an array.

The OCA Java SE 8 Programmer I exam covers only one class from the Java Collection API: ArrayList. The rest of the classes from the Java Collection API are covered in the OCP Java SE 8 Programmer II exam (exam number 1Z0-809). One of the reasons to include this class in the Java Associate exam could be how frequently this class is used by all Java programmers.

ArrayList is one of the most widely used classes from the Collections framework. It offers the best combination of features offered by an array and the List data structure. The most ...

Get OCA Java SE 8 Programmer I Certification Guide 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.