Re: Why all the max length constraints?

From: paul c <toledobythesea_at_oohay.ac>
Date: Wed, 31 May 2006 00:26:31 GMT
Message-ID: <Xo5fg.213333$7a.153813_at_pd7tw1no>


Bob Badour wrote:

> Marshall wrote:
> 

>> David Cressey wrote:
>>
>>> I thought Marshall said that Java strings were limited to a few
>>> gigabytes.
>>> I that "almost unlimited"?
>>
>>
>> OT: Java's String object is a wrapper for an array of char. Java
>> arrays are indexed by an int, which is by definition (by the *Java*
>> definition) a 32 bit signed integer. Because of this, arrays are
>> limited to 2^32-1 length, which means String objects have
>> the same limit on length.
> 
> 
> Do they really use the negative range?

even if they don't, it would make sense. Received on Wed May 31 2006 - 02:26:31 CEST

Original text of this message