import java.text.DecimalFormat;
String pattern = "###,###.###"; DecimalFormat decimalFormat = new DecimalFormat(pattern);