62,614
社区成员
发帖
与我相关
我的任务
分享
public class TestFormat {
public static void main(String[] args) {
NumberFormat c = NumberFormat.getCurrencyInstance(Locale.CHINA);
Double d = -223423434d;
System.out.println(c.format(d));
}
}
String currencySymbol = Currency.getInstance(Locale.CHINA).getSymbol();
DecimalFormat c = new DecimalFormat("###,###,###,###,###.00");
Double d = -223423434d;
System.out.println(currencySymbol + c.format(d));
String currencySymbol = Currency.getInstance(Locale.CHINA).getSymbol();
NumberFormat c = NumberFormat.getInstance(Locale.CHINA);
Double d = -223423434d;
System.out.println(currencySymbol + c.format(d));