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

Username:   Password: 
 RegisterRegister   
 Combining characters
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
xHoly-Divinity




PostPosted: Sat Sep 29, 2007 12:25 pm   Post subject: Combining characters

Suppose I had the characters 'a', 'b', and 'c'... Is there any way I can combine these characters into a single variable (i.e. a string). Also, I don't know the number of characters there will be. Thanks
Sponsor
Sponsor
Sponsor
sponsor
StealthArcher




PostPosted: Sat Sep 29, 2007 12:37 pm   Post subject: Re: Combining characters

For loop and append.
xHoly-Divinity




PostPosted: Sat Sep 29, 2007 12:58 pm   Post subject: Re: Combining characters

Could you please elaborate a bit. How would it work for the example 'a', 'b', 'c'?

Using StringBuilder, would it be something along the lines of

code:

StringBuilder word;
word = word.append ('a');


This is just a representation... how would it actually work?
xHoly-Divinity




PostPosted: Sat Sep 29, 2007 1:13 pm   Post subject: Re: Combining characters

Ahhh, you need to create a stringBuffer first. I got it working, thanks Mr. Green
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  [ 4 Posts ]
Jump to:   


Style:  
Search: