笔记

java.lang.NumberFormatException: For input string: " "

 

这个异常是说,在将字符串转换为number的时候格式化错误“”空的字符串有对应的数值吗,显然没有所以你可以Double.parseDouble(n.equals("")?"0":n);n是你需要转换的字符串

posted @ 2020-02-01 22:59  Super_Justin  阅读(73)  评论(0)    收藏  举报