已采纳回答 / Tears丶
索引从0开始,你就当他从1开始,本来要的不就是后一位吗,
String prefix = fileName.substring(fileName.lastIndexOf(".") + 1);fileName.lastIndexOf(".")这个式子取得一直是点的索引,4,5--5,6。的差距。你自己好好想想,这是我自己的理解。
2019-02-09
最新回答 / 慕斯7356729
把System.out.println("添加了两门课程:"+temp4.id +":"+temp4.name+";"+temp5.id +":"+temp5.name);放在System.out.println("添加了两门课程:"+temp6.id +":"+temp6.name+";"+temp7.id +":"+temp7.name);之后试试。
2019-02-07
已采纳回答 / 慕桂英6436620
问题:数组下标越界<...code...><...code...>应该改成
Course temp3=(Course)coursesToSelect.get(); coursesToSelect.get();
2019-02-01
最赞回答 / 慕桂英6436620
首先你打错了,是str.insert其次这么写一上来就数组范围超界了呀,而且你一直自增i,这个for循环会无限循环吧……我是这么写的↓<...code...>
2019-01-31