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 traditional arrays is that when we instantiate them, we have to give them a specific length, so we have to know how large we want...