1String number = "1000500000.574";
2double amount = Double.parseDouble(number);
3DecimalFormat formatter = new DecimalFormat("#,###.00");
4// the zeroes after the point are the number of digits shown after the period
5// you can also switch point and commas and get for example 1.002,45
6System.out.println(formatter.format(amount));
7// this prints 1,000,500,000.57