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? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -