remove dots and commas java code example Example: remove dots and commas java String str1 = s.replaceAll("[,.]", "");