String.format() to format double in Java

String.format("%1$,.2f", myDouble);

String.format automatically uses the default locale.

Leave a Comment