> I was wondering if the JVM had some extensions to let you also do long
> arrays. Apparently not.
>> The compiler requires an array index to be an int, if that's what
>>you're asking.
> Shades of Segment registers to 64K chunks.
Well, there is a big difference between 64K and 4G.
I never had so much trouble even in the 64K days, an array of
pointers to arrays, where each array was up to 64K was good enough
for the problems I was doing at the time.
An int subscript to a double array could be up to 32GB, and again
one can use two dimensional arrays (oops, arrays of object references
to arrays).
Still, I agree that it was a mistake to specify int subscripts
in the first place.
-- glen
Wee Jin Goh - 21 May 2004 22:38 GMT
>> I was wondering if the JVM had some extensions to let you also do long
>> arrays. Apparently not.
[quoted text clipped - 18 lines]
>
> -- glen
Wouldn't that be 16 GB since ints in Java are signed and only go up to
2^31 (hence 2GB * 8 = 16GB).
Wee Jin