Java Replace Character At Specific Position Of String?

Viewed 161148

I am trying to replace a character at a specific position of a string.

For example:

String str = "hi";

replace string position #2 (i) to another letter "k"

How would I do this? Thanks!

5 Answers
Related