Link to home
Create AccountLog in
Avatar of chaitu chaitu
chaitu chaituFlag for India

asked on

commas with decimals in amounts

                 String x="24668124.00";
                  DecimalFormat df = new DecimalFormat("#,###,###.##");
                  System.out.println(df.format(Double.parseDouble(x)));

                  when i print this value 24,668,124 is coming but i want with decimals like this24,668,124.00 ;
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

DecimalFormat df = new DecimalFormat("#,###,###.00");
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer