java推断线程是不是运转【JAVA教程】,java,线程
java中能够运用Thread.isAlive()推断线程是不是运转,Thread.IsAlive属性 ,示意该线程当前是不是为可用状况,假如线程已启动,而且当前没有任何非常的话,则是true,否则为false。(引荐:java视频教程)
/** * Tests if this thread is alive. A thread is alive if it has * been started and has not yet died. * @return <code>true</code> if this thread is alive; * <code>false</code> otherwise. */ Thread.isAlive()
更多java学问请关注java基础教程栏目。
以上就是java推断线程是不是运转的细致内容,更多请关注ki4网别的相干文章!