For input string: "0.01"

DecimalFormat df = new DecimalFormat("0.00");//格式化小数
String str = df.format(bean.getAmount()/100.0);
bean.setAmount(Integer.parseInt(str));//这行报错
求大神解决

bean.setAmount(Integer.parseInt(str));//这行报错

在上一行报错,问题出现在原因是:str 转换成Integer 失败; 具体检查str是什么值

java.lang.NumberFormatException:  For input string: ":"
这个问题,我一开始有一位......
答案就在这里:For input string: ":"
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。