Exception in thread "main" java.lang.IllegalStateException: Queue full
at java.util.AbstractQueue.add(AbstractQueue.java:98)
at java.util.concurrent.
Exception in thread "main" java.lang.IllegalStateException: Queue full
at java.util.AbstractQueue.add(AbstractQueue.java:98)
at java.util.concurrent.
Callable接口类似于Runnable ,因为它们都是为其实例可能由另一个线程执行的类设计的, 然而Runnable不返回结果,也不能抛出被检查的异常。
Callable和Runnable的区别:
① Callable有返回值
② Callable可以抛出异常
③ Callable的方法是call(),Runnable的方法是run()
Callable、Thread、Runna
Powered By Z-BlogPHP 1.7.3
Copyright Your WebSite.Some Rights Reserved.