public static String accuracy(double num, double total, int scale){
DecimalFormat df = (DecimalFormat)NumberFormat.getInstance();
//精确几位小数
df.setMaximumFractionDigits(scale);
//模式 (四舍五入)
df.setRoundingMode(RoundingMode.HALF_UP);
double accuracy_num = num / total * 100;
return df.format(accuracy_num)+"%";
}