I\'m trying to replace a character at a specific index in a string.
What I\'m doing is:
String myName = \"domanokz\"; myName.charAt(4) = \'x\';
String is an immutable class in java. Any method which seems to modify it always returns a new string object with modification.
String
If you want to manipulate a string, consider StringBuilder or StringBuffer in case you require thread safety.
StringBuilder
StringBuffer