Science, asked by drrspandana7842, 1 year ago

What is the max size of an array allowed in java?

Answers

Answered by rjgolu
3
In Java, arrays internally use integers (int not Integer) for index, the max sizeis limited by the max size of integers. So theoretically it is 2^31-1 =2147483647, which is Integer.MAX_VALUE. But in recent HotSpot JVM it has been observed that the max size of array can be Integer.
Similar questions