1: 2: 3: 4: 5:
public static void main(String[] args) { java.text.DecimalFormat format = new java.text.DecimalFormat("#,##0.00"); System.out.println( format.format(10000000.67890)); // output is "10.000.000,68" }