The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Max String Length

Posted by Ali Khawaja on July 19, 2001 at 5:56 PM

> Hi, I am writing a program that works with extremely large numbers and file handling. I was wondering if a String object has a max length? Also, if I have two BigInteger objects, can I append one to the other without converting to String (this is in case String has a max length)? Thanx in advance.
> Hiran

Memory for Strings is dynamically allocated, so basically they
are limited by the physical memory of your system. I am not saying that this is good use of them to make as large as possible, but you can do that.

Beside that, your BigIntegers can be of arbitrary lenght as you know. Converting to them to String objects and appending is no problem and should be trivial also.

- Ali


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us