java 中Double类型转换为百分比格式

NumberFormat num = NumberFormat.getPercentInstance();
String rates = num.format(0.03);
System.out.println(rates);//输出3%

 

    原文作者:huayang183
    原文地址: https://blog.csdn.net/qq_18671415/article/details/105272954
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞