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!

Need to append a String at the Starting or Beginning of a StringBuffer ????

807607Oct 10 2006 — edited Oct 10 2006
Hi All,

I am having a StringBuffer. for example StringBuffer s = new StringBuffer("kathir");

I like to append a string with the stringbuffer at the starting point.

Input
StringBuffer s = new StringBuffer("kathir");

need to append "raj" before kathir

Output
raj kathir

Is there is any way to do this using StringBuffer. Do we have any functions in StringBuffer which does this ?

Thanks,
J.Kathir
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2006
Added on Oct 10 2006
8 comments
286 views