This is another way to remove comma or other part of string:
you have String str1=new String("Rs. 30,000");
String str2=new String("30000");str1= str1.replace(",", "");str1= str1.replace("Rs.", "");
So now if you compare them so result will be true.
if(string1.equals(string2)){
Sysyem.out.println("true");
}
I hope you like it !