The benefits of a list over an array, in my opinion, are rather clear:
- List<Integer>, List<? extends Number>, and List<? super Integer> are examples of generics that offer more exact typing.
- addAll, remove, and other helpful methods are available on a List interface. While for arrays all common operations—aside from get and set—must be carried out procedurally by sending the object to a static method.
- Different implementations, such as ArrayList, LinkedList, unmodifiable, and synchronised lists, are available in collections and can be buried behind a single List interface.
- OOB length control.
The disadvantages that I can think is the lack of syntactic helper and runtime check type. Still, the support for both structures needs use of asList and toArray methods, but this makes the code less readable.
So, what are the other points that I missed?