java数字转百分数

java数字转百分数,超简单

解决方法:

使用jdk自带的java.text.NumberFormat类即可,例子如下所示。

double num=0.56966;

NumberFormat numberFormat  = NumberFormat.getPercentInstance();     

numberFormat  转百分数的方法:http://​www.yayihouse.com/yayishuwu/chapter/1642

猜你喜欢

转载自blog.csdn.net/qq_30908729/article/details/83182583
今日推荐