This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes maximum characters in string Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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
Bartender

Joined: Aug 16, 2005
Posts: 12911
    
    3

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: 14672
    
  11

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: 32654
    
    4
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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: maximum characters in string
 
Similar Threads
max size of a string
Breaking up text in lines
Max length for a String?
How to put clob in org.w3c.dom.Document
is there a maximum length for java.lang.String?