1.保留两位小数

double  c=19.98555315;
java.text.DecimalFormat df = new java.text.DecimalFormat("0.00");
String str = df.format(c);  

 

相关文章: