Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Length of a string?
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Aziz




PostPosted: Sat Jul 02, 2005 2:13 pm   Post subject: Length of a string?

Well I'm making up a program to store information about characters (like a character in a story) and the three fields are:

Name
Age
Description

I plan on using a type of GUI (which I need to learn) , and for name and description a simple one-line text box, but for the description, I want to use a multi-lined text box (like the one I'm typing in right now, actually Razz). Does a String in java have an infinite length, or is it set to 256 characters? And if so, what should I do?

Thanks
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Sat Jul 02, 2005 2:23 pm   Post subject: (No subject)

Strings in Java don't have any particular length. However, there's nothing stopping you from checking the length of the input and simply scomplaining and asking the user to change it if it's greater than 256 characters.
Aziz




PostPosted: Sat Jul 02, 2005 3:11 pm   Post subject: (No subject)

Cool, thanks, just trying to make so the person I'm doing this for (my girlfriend, actually) can simply type in information (likely, a paragraph or two). Is there a better way to do this?
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: