[jdom-interest] Question about element length
Ilja Preuß
ilja.preuss at epost.de
Tue Aug 22 12:21:06 PDT 2000
> Regardless, I don't believe Java has a String length restriction. I
> just wrote a sample program that constructs a 1,000,000 character
> string, and it worked fine. Now I seem to recall method bodies have a
> 64K restriction; maybe you're thinking of that.
Well, in fact the length of a String is stored as an int, so the maximum
length would be 2.147.483.647 chars, that's a 4 terabyte restriction (as a
char is two bytes). Of course this will never be a problem, in the same way
the Y2K never was... ;-)
Regards, Ilja
More information about the jdom-interest
mailing list