String[] str = distributionRatio.split("\\,");//如果(distributionRatio包含多个数)需要拆分
Double i = 0.0;
for(int j=0;j<str.length;j++){
Double b=Double.parseDouble(str[j].replace("%", ""));//如果出错 应该是编码下的%的问题  把前端返回来的%复制在(str[j].replace("%", ""))里面的%就可以了
i = i + b;
}

相关文章:

  • 2021-12-22
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-12-25
  • 2021-11-14
  • 2021-12-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2021-12-25
  • 2021-10-01
相关资源
相似解决方案