Feb 16

The NumberFormat class provides support for currency formatting. By current default Locale is used to determine what currency the value should be formatted in.

double value = 6.34;
NumberFormat formatter = NumberFormat.getCurrencyInstance();
String formatted = formatter.format(value);

written by objects \\ tags: , , ,

Leave a Reply

You must be logged in to post a comment.