File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Spring in Action this week in the Spring 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: 14268
    
  21

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 8 API documentation
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  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: 39395
    
  28
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