Replacing chars in strings

Here is the situation:

[code]

int x=4

char letter1='Z'

String word1="blah blah"

/code]

I was wonering if the was an easy way of replacing a character in a string with another at a ceratin point in the string. In this case, I want a string that would say "blahZblah". Thanks.

[319 byte] By [TheRealBillCosbya] at [2007-10-2 10:17:01]
# 1
Sure> int x=4> char letter1='Z'> String word1="blah blah"[String word2 = word1.substring(0,x) + letter1 + word.substring(x + 1)
tjacobs01a at 2007-7-13 1:42:50 > top of Java-index,Java Essentials,Java Programming...
# 2
Thank you.
TheRealBillCosbya at 2007-7-13 1:42:50 > top of Java-index,Java Essentials,Java Programming...