原因:这个异常是说,在将字符串""转换为number的时候格式化错误。额,很简单的异常,以前我是写个方法,然后遍历对比不正确的数字或者用正则表达式之类的。现在发现一个很漂亮的方法,用三段式判断写的。
Double.parseDouble("".equals(num)?"0":n);