今天把昨天的代码补全了 ,但是总是会出现一些 异常,出现的的错误是 ,错误的行数不确定,请大神帮忙解答一下,昨天帖子地址:[url]http://bbs.itheima.com/thread-207208-1-1.html[/url]
****************************************
火车站3:窗口1:(售):票号:(20150001)余票:299
Exception in thread "火车站4:" Exception in thread "火车站1:" java.lang.IllegalThreadStateException
at java.lang.Thread.start(Thread.java:704)
at review.Depot.run(Depot.java:69)
at java.lang.Thread.run(Thread.java:744)
java.lang.IllegalThreadStateException
at java.lang.Thread.start(Thread.java:704)
at review.Depot.run(Depot.java:69)
at java.lang.Thread.run(Thread.java:744)
Exception in thread "火车站2:" java.lang.IllegalThreadStateException
at java.lang.Thread.start(Thread.java:704)
at review.Depot.run(Depot.java:69)
at java.lang.Thread.run(Thread.java:744)
Exception in thread "火车站3:" java.lang.IllegalThreadStateException
at java.lang.Thread.start(Thread.java:704)
at review.Depot.run(Depot.java:69)
at java.lang.Thread.run(Thread.java:744)
火车站3:窗口1:(售):票号:(20150002)余票:298
********************
at java.lang.Thread.run(Thread.java:744)
火车站2:窗口1:(售):票号:(20150002)余票:298
火车站2:窗口1:(售):票号:(20150003)余票:297
火车站2:窗口1:(售):票号:(20150004)余票:296
火车站4:窗口[5]:【退】:票号:(20150004)余票:297
火车站1:窗口[6]:【退】:票号:(20150003)余票:298
火车站4:窗口[6]:【退】:票号:(20150002)余票:299
火车站4:窗口[6]:【退】:票号:(20150001)余票:300
Exception in thread "火车站4:窗口[6]:【退】:" Exception in thread "火车站1:窗口[5]:【退】:" java.lang.IllegalMonitorStateException
at java.lang.Object.notify(Native Method)
at review.Depot$SetTicketWindows.run(Depot.java:206)
at java.lang.Thread.run(Thread.java:744)
java.lang.IllegalMonitorStateException
at java.lang.Object.notify(Native Method)
at review.Depot$SetTicketWindows.run(Depot.java:206)
at java.lang.Thread.run(Thread.java:744)
火车站1:窗口4:(售):票号:(20150001)余票:299
火车站1:窗口4:(售):票号:(20150002)余票:298
********************
下面是今天补全的火车站类:
测试类在昨天发的帖子里:http://bbs.itheima.com/thread-207208-1-1.html
|
|