Skip to Main Content

New to Java

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

is there a method for adding a character to a string?

843785Nov 13 2008 — edited Nov 13 2008
Hello,

is there a String method to add a Char to a String given the character number on the string?

EXAMPLE:

String text = "hello world"

I'd like to add a comma after the the 'o' (4th character) so I that text reads: "hello, world"

is there something like:

text.addChar(Char, position in string) ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 11 2008
Added on Nov 13 2008
8 comments
294 views