• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maximum characters in string

 
Kowshik Nandagudi
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the maximum number of characters that can be stored in string???
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Integer.MAX_VALUE or, theoretically, half your heap size - whichever is smaller.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15219
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Christophe Verré wrote: . . . This might be asked at Jeopardy.
Does that mean this thread should move to "MD"?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic