Re: Why all the max length constraints?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Tue, 30 May 2006 22:35:07 GMT
Message-ID: <vM3fg.15245$A26.356280_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? Received on Wed May 31 2006 - 00:35:07 CEST

Original text of this message