I have a string that shows a number with a comma separator like this:
DecimalFormat formatter = new DecimalFormat("#,###.000000");
String toDouble=formatter.format(amount);
Now I want to remove commas in BO class to do arithmetic operations. I used this format:
StrCash_price_deal = StrCash_price_deal.replace(",", "");
double d = Double.valueOf(StrCash_price_deal.trim()).doubleValue();
but it changes the value to zero!!! my technology is struts2