How to replace character inside string in java -
this question has answer here:
- replace string in java 5 answers
- substitute characters in string 4 answers
i have string similar 1 below:
string abc = "122222";
and want able replace specified character inside string, '1' becomes '2' in example above.
string abc = "122222"; abc = abc.replace('1','2');
Comments
Post a Comment