Unless you have a good reason, I would recommend using lists by arrays.
There are some specific cases when you want to use an array (for example, when you implement your own data structures or when you address a very specific performance requirement that you have profiled and identified as a bottleneck), but for general purposes, Lists are more convenient and will be offer you more flexibility in how you use them.
If you are able, I would also recommend programming an abstraction (List), rather than a specific type (ArrayList). Again, this gives you flexibility if you decide to describe in detail the implementation details in the future.
To eliminate your readability point: if you have a complex structure (e.g. ArrayList from HashMaps of ArrayLists), consider either encapsulating this complexity in a class, or / or creating some very clearly named functions to manage the structure.
source share