Use the insert(int offset, String str) method of StringBuffer.
Are you using the Java API Docs? If you are serious about using Java, then you CANNOT make progress without them. They would have alerted you to the presence of this method, for instance.
I am studying Java and using Eclipse.
When I enter the object name followed by a dot, I can see all the methods available to me. Is that what you meant?
Thank you for your reply. I tried it and it works.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.