SyntaxFix
Write A Post
Hire A Developer
Questions
Use:
String str = "whatever"; str = str.replaceAll("[,.]", "");
replaceAll takes a regular expression. This:
[,.]
...looks for each comma and/or period.