public class RunnableTwo implements Runnable { private Thread t = new Thread(this); private boolean alive; private boolean active; public RunnableTwo() { active = true; alive = true; t.start(); } public void kill(){ active = false; alive = false; } public void pause(){ active = false; } public void restart(){ active = true; } public void run() { while(alive){ while(active){ System.out.println("Thread 2"); try { t.sleep(1000); } catch(InterruptedException ie) {} } try { t.sleep(25); } catch(InterruptedException ie) {} } } }