If there are too many objects, use collections to store data, use arrays to store data.
Arrays are of fixed length, and collections are of variable length.
The collection is: as long as it is an object, no matter whether it is the same object or not
Arrays can only store objects of one type
Here is the framework of the collection:
The above is the full content that the editor has brought to you about the origin of collections in Java and the details of the differences between collections and arrays. I hope it will be helpful to everyone and support Wulin.com more~