infiniteloopthread.java

来自「java 完全探索的随书源码」· Java 代码 · 共 24 行

JAVA
24
字号
public class InfiniteLoopThread extends Thread{  // Default Constructor  public InfiniteLoopThread()  {    super();  }  // Override the parents run method  public void run()  {    // variable for exit condition - default to false    boolean timeToExit = false;    // Keep the thread going until time to exit is true    while( !timeToExit )    {      // Do some work here that might cause the exit      // condition to change    }    // Thread is exiting. Clean up any open resources  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?