7.1 Introduction to ArrayList
Enduring Understanding
To manage large amounts of data or complex relationships in data, programmers write code that groups the data together into a single data structure without creating individual variables for each value.
Learning Objective
Represent collections of related object reference data using ArrayList objects.
Essential Knowledge
An ArrayList object is mutable and contains object references.
The ArrayList constructor ArrayList() constructs an empty list.
Java allows the generic type ArrayList, where the generic type E specifies the type of the elements.
When ArrayList is specified, the types of the reference parameters and return type when using the methods are type E.
ArrayList is preferred over ArrayList because it allows the compiler to find errors that would otherwise be found at run-time.
Last updated
Was this helpful?