You are on page 1of 1

NumberFormat nf = NumberFormat.

getInstance();
nf.setMaximumFractionDigits(2);
nf.setGroupingUsed(false);
// Setting this to true will give you xx,xxx,xxx type of formatting.
String formattedvalue = nf.format(adoublevalue);

You might also like