int a = 3288;
int b = 1000;
DecimalFormat decimalFormat = new DecimalFormat("0.000");
String format = decimalFormat.format((float) a / b);
System.out.println(format); >>>>>>>format =3.288
一位小数0.0 三位小数0.000
int a = 3288;
int b = 1000;
DecimalFormat decimalFormat = new DecimalFormat("0.000");
String format = decimalFormat.format((float) a / b);
System.out.println(format); >>>>>>>format =3.288
一位小数0.0 三位小数0.000