Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Java string question
Name: rjackson2090 Date: February 24, 2004 at 19:06:36 Pacific OS: Windows XP Professional CPU/Ram: Amd Duron 1.3 at ~1.4 ,5
Comment:
hey, i have a quick question about strings
im using the stringbuffer class to store letters in a string, i was wondering if there was an easy way to distinguish parts of the string say if i have
StringBuffer a and i add the words "one" then "two" a would contain "onetwo" my question is if i wanted to extract that one two, how could i extract them without doing it character by character(because i wouldnt know where the end of the word was)
My solution was to add a ',' between each one i putting in i.e. "one,two" but i dont know if this is the most efficent way, thanks for your help in advance.
Name: wharfie Date: March 1, 2004 at 14:46:48 Pacific
Reply:
I think your on the right track with using the delimiter. You can then use the StingTokenizer class if your using Java prior to 1.4 or String.split() if your using Java 1.4.x.
Summary: hey im new here hello to every one, but im taking a software design class and the first day the instructer alerts us that its in java and he doesnt know java himself yet nice right? My question is a...
Summary: Hi i nee some help with Java Strings. I need to writte a programm that will count the number of characters.Exampl: Input: cooomputer Output:c3omputer I have written only the part that counts the chara...
Summary: Hello, I have just started taking Java (programming III/IV) at my high school, and was wondering if any of you can give me a better explanation of the following question, than what my teacher had told...