I tried to replace characters in String which works sometimes and does not work most of the time.
I tried the following:
String t = \"[javatag]\"; String
t.replace(....);
gives you a String (return a string)
you can reassign the origin variable name to the new string
and the old string will later been garbage-collected :)