0
Can someone help me create a method that replaces the Characters of a String? For example,
String nova = antiga.replace('a','1');
This only replaces a letter.
I wanted to create a method for all other letters of the alphabet that I could use whenever I wanted to replace the characters of a certain String.
Are you using data input through the console ? Or have some visual screen ?
– Dev
@Matheus as well as visual screen?
– Eduardo Brito
Knowing if it is a graphical interface or console is irrelevant to doubt, the
replaceall
mentioned below does exactly what you want.– user28595