Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java-String vs StringBuffer Class

807589Dec 3 2008 — edited Dec 25 2008
Hai Friend

as far as my knowledge String Class contain cannot be changed in the later whereas String Buffer class contains can be changed in the future.

but ,still i am able to change the contain of String Class like

String s1 = new String("Selvakumar");
String s2 = new String("Ravikumar");
String s3 = s1.concat(s2);
System.out.println("output is " + s3);

output is

SelvakumarRavikumar. here how i am geting combined output.


you please explain me clearly


Thanks

Selvakumar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 22 2009
Added on Dec 3 2008
81 comments
695 views