import java.text.*; //格式化数字 public class number { public static void main(String args[]) { double d = 123456.78; DecimalFormat df = new DecimalFormat("###,###"); System.out.println(df.format(d)); } }
import java.text.*; //格式化数字 public class number { public static void main(String args[]) { double d = 123456.78; DecimalFormat df = new DecimalFormat("###,###"); System.out.println(df.format(d)); } }
转载于:https://www.cnblogs.com/toSeeMyDream/p/5577542.html