String Handling - replace

*Sometimes I feel like a fool working with openHab. I cannot see my problem with the following code:

var String dummyStr="xxx"
logInfo("test","value is "  + dummyStr)     => "xxx"
dummyStr.replace("x","yyyyyyyyyyyyyyyy")
logInfo("test","value is "  + dummyStr)     => "xxx"

Why does replace not work?

I knew it must be something silly. Here correct code

var String dummyStr="xxx"
logInfo("test","value is "  + dummyStr)     => "xxx"
dummyStr=dummyStr.replace("x","yyyyyyyyyyyyyyyy")
logInfo("test","value is "  + dummyStr)     => "xxx"

[/quote]