Length of a string?
Author |
Message |
Aziz
|
Posted: 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 ). 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
|
|
|
wtd
|
Posted: 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
|
Posted: 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? |
|
|
|
|
|
|
|