goalData.add(new Profit(tempSaveData.get(0), tempSaveData.get(1), tempSaveData.get(2) == "" ? 0 : Integer.parseInt(tempSaveData.get(2)), tempSaveData.get(3) == "" ? 0 : Integer.parseInt(tempSaveData.get(3)))
如上代码,在2和3的字段中,是为integer的。但是导入的数据是null,于是,我把它设置为“”,然后让三目判断,怎么还是提示这个错误呢?
tempSaveData是String集合,List<String>,我把没有数据的都设置为""报错在这个数组中,然后放进上面的对象中,
tempSaveData.get(2)这些都是String类型的
30秒到达战场
皈依舞
相关分类