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