java小数点保留后两位

 double ss=1.2933;
 System.out.println(String.format("%.2f",22));

猜你喜欢

转载自blog.csdn.net/wangzhichaogege/article/details/108217223