ArrayLists
When we need a Java data structure, we should start by asking ourselves whether a simple array is sufficient. If we can write our program easily and neatly using just an array, that might be our best option to keep our programs simple by extension. If you're writing code that must run as fast as possible and use memory as efficiently as possible, arrays will also have very little overhead. But, in today's development world, where memory efficiency and speed really aren't concerns for your average program, sometimes we need to employ data structures with more built-in functionality, or maybe which are designed for a specific purpose.
A data structure with additional functionality is called an ArrayList. One of the weaknesses of ...
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