java数字转百分数,超简单
解决方法:
使用jdk自带的java.text.NumberFormat类即可,例子如下所示。
double num=0.56966;
NumberFormat numberFormat = NumberFormat.getPercentInstance();
numberFormat 转百分数的方法:http://www.yayihouse.com/yayishuwu/chapter/1642
java数字转百分数,超简单
解决方法:
使用jdk自带的java.text.NumberFormat类即可,例子如下所示。
double num=0.56966;
NumberFormat numberFormat = NumberFormat.getPercentInstance();
numberFormat 转百分数的方法:http://www.yayihouse.com/yayishuwu/chapter/1642