Re: Why all the max length constraints?
From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Wed, 31 May 2006 02:20:19 GMT
Message-ID: <D37fg.15352$A26.358104_at_ursa-nb00s0.nbnet.nb.ca>
>> 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.
Date: Wed, 31 May 2006 02:20:19 GMT
Message-ID: <D37fg.15352$A26.358104_at_ursa-nb00s0.nbnet.nb.ca>
paul c wrote:
> 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.
I agree it did not affect the point being made. I was just surprised, and it turned out to be only a typo. No biggie. Received on Wed May 31 2006 - 04:20:19 CEST