+ 1
What is ArrayList?
2 Respostas
+ 1
The ArrayList class extends AbstractList and implements the List interface. ArrayList supports dynamic arrays that can grow as needed. Standard Java arrays are of a fixed length. After arrays are created, they cannot grow or shrink, which means that you must know in advance how many elements an array will hold.
+ 1
ArrayList is used to store a collections of objects. They are flexible ( can grow and shrink when needed).
Benefits of ArrayList:
Better for accessing elements
Better for storing data
Flexibility
Etc.
Disadvantage:
Not the best for inserting data( LinkedList is better for this)
Not the best for deleting data( LinkedList is better for this)
Etc.