How to replace character inside string in java -


this question has answer here:

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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -