Java数组长度最大能有多大?
2016-09-23 15:22
369 查看
down vote | This is (of course) totally VM-dependent. Browsing through the source code of OpenJDK 7 and 8 java.util.ArrayList, .Hashtable, .AbstractCollection, .PriorityQueue, and .Vector, the eight is size of header words.,you can see this claim being repeated: /** * Some VMs reserve some header words in an array. * Attempts to allocate larger arrays may result in * OutOfMemoryError: Requested array size exceeds VM limit */ private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8; |
down vote |
相关文章推荐
- Java 数组的最大长度 位图集合的最大长度
- Java整型数组的最大长度到底有多长?
- java中数组的最大长度以及List的最大容量
- java中数组的最大长度以及List的最大容量
- java中数组的最大长度以及List的最大容量
- 给定一个任意长度的java数组,求数组内的数能组合出来的最大整数
- java中数组的最大长度以及List的最大容量
- java中数组的最大长度以及List的最大容量
- java中数组的最大长度以及List的最大容量
- java中数组的最大长度以及List的最大容量
- java__给定一个非负整数数组,假定你的初始位置为数组第一个下标。 数组中的每个元素代表你在那个位置能够跳跃的最大长度。 请确认你是否能够跳跃到数组的最后一个下标。
- java中数组的最大长度以及List的最大容量
- java数组根据字符串长度排序,并根据包含关系返回最大字符串
- java中数组的最大长度以及List的最大容量
- Java整型数组的最大长度到底有多长?
- java中数组的最大长度以及List的最大容量
- Java整型数组的最大长度到底有多长?
- java中数组的最大长度以及List的最大容量
- java中数组的最大长度以及List的最大容量
- java中数组的最大长度以及List的最大容量