I got to find from Do Java arrays have a maximum size? that there is a maximum limit for array size .
May be with the intention that it might deplete heap space . Yes, I agree with the point .
I cannot understand the following :
But why to have this limit for every single array ?
what if I have a number of arrays of such large size ?
why not throw an exception when some threshhold of heap space is reached overall(total consumption) , instead of having upperbound for each array ?
Note :
In Python, they have this limit How Big can a Python Array Get?
In C , there seems like no limit (except the hardware used) The maximum size of an array in C