作者kriss (这是~~?)
看板java
标题[问题] 不给我run第二次
时间Fri Nov 30 17:48:28 2007
在练写一个小程式,将一个数字加入或移出array
程式会要求使用者输入a,d,q
a for add, d for del, and q for quit
程式应该要在完成一次加入或删除後继续执行下一次
直到使用者输入q离开
但是我的程式看起来没问题
a跟d的功能也正常,但是run完一次後就会出现error如下
Exception in thread "main" java.lang.StringIndexOutOfBoundsException:
String index out of range: 0
at java.lang.String.charAt(String.java:558)
at arrayAddDelExtraCredit.processData(arrayAddDelExtraCredit.java:85)
at arrayAddDelExtraCreditClient.main(arrayAddDelExtraCreditClient
.java:35)
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.
不知道是那出了问题了
请大家帮帮忙
原始码如下link
http://0rz.tw/593la
--
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 71.179.173.78