aspose file tools*
The moose likes Java in General and the fly likes maximum characters in string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "maximum characters in string" Watch "maximum characters in string" New topic
Author

maximum characters in string

Kowshik Nandagudi
Ranch Hand

Joined: Dec 09, 2010
Posts: 57
what is the maximum number of characters that can be stored in string???
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
Integer.MAX_VALUE or, theoretically, half your heap size - whichever is smaller.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13872
    
  10

This is not the first time someone asks this question on the forums here. I wonder why this is such an interesting question.

Is this an interview question that gets asked to a lot of people? If it is, then the goal is probably not to check if you know the answer, but to find out how you reason to find an answer to the question.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Jesper de Jong wrote:This is not the first time someone asks this question on the forums here. I wonder why this is such an interesting question.

This might be asked at Jeopardy.


[My Blog]
All roads lead to JavaRanch
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36478
    
  16
Christophe Verré wrote: . . . This might be asked at Jeopardy.
Does that mean this thread should move to "MD"?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: maximum characters in string
 
Similar Threads
Max length for a String?
Breaking up text in lines
max size of a string
is there a maximum length for java.lang.String?
How to put clob in org.w3c.dom.Document