StopBoolean t1 = new StopBoolean(); t1.start(); Thread.sleep(1000*5); System.out.println("Stopping thread..."); t1.stop(); // EXPECT COMPILER WARNING
while (true) { System.out.println("StopBoolean running"); try { sleep(720); } catch (InterruptedException ex) { // nothing to do } }