int i = 50
int j = 100
DecimalFormat df = new DecimalFormat();
df.setMaximumFractionDigits(2);
df.setMinimumFractionDigits(2);
String k= df.format(i * 100.00 / 100) + "%";
K的值是50%
int i = 50
int j = 100
DecimalFormat df = new DecimalFormat();
df.setMaximumFractionDigits(2);
df.setMinimumFractionDigits(2);
String k= df.format(i * 100.00 / 100) + "%";