java arraylist最大长度_java – 为什么ArrayList的最大数组大小是Integer.MAX_VALUE – 8?...
The shape and structure of an array object, such as an array of intvalues, is similar to that of a standard Java object. The primarydifference is that the array object has an additional piece ofmetada
The shape and structure of an array object, such as an array of int
values, is similar to that of a standard Java object. The primary
difference is that the array object has an additional piece of
metadata that denotes the array’s size. An array object’s metadata,
then, consists of: Class : A pointer to the class information, which
describes the object type. In the case of an array of int fields, this
is a pointer to the int[] class.
Flags : A collection of flags that describe the state of the object,
including the hash code for the object if it has one, and the shape of
the object (that is, whether or not the object is an array).
Lock : The synchronization information for the object — that is,
whether the object is currently synchronized.
Size : The size of the array.
更多推荐


所有评论(0)