获得百分比字符串

    技术2025-09-12  8

    获得百分比字符串

     

     public static String getPercent(double p1, double p2) {  String str;  double p3 = p1 / p2;  NumberFormat nf = NumberFormat.getPercentInstance();  nf.setMinimumFractionDigits(1);  str = nf.format(p3);  return str; }

    最新回复(0)