I'm new to Java and 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';
this gives me error. It seems like charAt
is readOnly. Is there any method to do this?
Thanks in advance!