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!

Copying the value of a StringBuffer Object

807605Sep 5 2007 — edited Sep 5 2007
Hi

I need to copy the value of a StringBuffer obeject into another StringBuffer object. How do i this
For ex
StringBuffer temp= new StringBuffer("hello");
//copy the value of temp into temp2
StringBuffer temp2 = null;
I[b] need to copy the value of temp to temp2, such that if i make any changes to temp2 those donot affect temp.

Thank U
Mansoor
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 3 2007
Added on Sep 5 2007
11 comments
2,021 views