This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Question on the String max size 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 » Beginning Java
Bookmark "Question on the String max size" Watch "Question on the String max size" New topic
Author

Question on the String max size

A Chavda
Greenhorn

Joined: Apr 15, 2008
Posts: 3
Hi,
could any one tell me what is the maximum size for the string . To my opinion its 2^16 that is 65536 bytes. Also string is the sequence of char array. So i need to know 65536 bytes means string value can be of 65536 characters.

Take an example I have a string variable and says that it should be of 255 max size. should i consider this as 255 characters value.

Please clear my doubts

Thanks in advance
Anvi
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Anvi",
Please check your private messages regarding an important administrative matter.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 10908
    
  12

Also, we have this neat "search" feature at the top of (almost?) every page. I search this forum for "String max size", and in about 2 seconds, found this thread.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on the String max size
 
Similar Threads
JTextArea
data access
max length of doGet() request supported by browser
Deciphering the instructions
Max number of characters printed in system.out.println