+ 1

Removing specific characters in Java

Is there a practical method for removing characters in a String in Java? I do it with substring() method, but I wish I had a more practical method.

20th Sep 2020, 4:26 PM
Lucas Kliemczak
Lucas Kliemczak - avatar
1 Réponse
+ 6
Using String.replace String s = "some string"; s = s.replace("s",""); System.out.print(s); //ome tring
20th Sep 2020, 4:34 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar