String A[] =["999,999.00","123,25.00","452,452,123.00"]
for(int i=0;i<=A.length;i++){ // There are two ways to do this first is replace all char except numeric values or just replace comma. // First replace comma System.out.println(str.replaceAll(",", "")); // Sec replace all chars except numeric values System.out.println(str.replaceAll("[^\\d.]", "")); }
I hope it helped !