In java, arrays can hold basic data types and objects. Why must an object be stored in a collection? Ask someone for advice,
First of all, you should know that the bottom layer of java is C, and arrays can only store basic data types, which will not change at present. Arrays can never store objects. Your so-called storage object is just a reference to the storage object, which is essentially a plastic array; Sets are divided into ArrayList and linkedList. You should know that the essence of ArrayList is actually an array, which stores references, and references can only be called objects in java, but you can't say that arrays can store objects.