new Thread() { public void run() { while (true) { rightHelpHandFlag = !rightHelpHandFlag; try { Thread.sleep(600);//600 } catch (Exception e) { // TODO: handle exception } } }; }.start();
核心代码是:rightHelpHandFlag = !rightHelpHandFlag;
new Thread() { public void run() { while (true) { rightHelpHandFlag = !rightHelpHandFlag; try { Thread.sleep(600);//600 } catch (Exception e) { // TODO: handle exception } } }; }.start();
核心代码是:rightHelpHandFlag = !rightHelpHandFlag;