public class Me extends Thread { public void run() { try { while(!Thread.currentThread().isInterrupted()) { System.out.println("Carpe diem !"); } } catch (InterruptedException consumed) { System.out.println("Mathematical Induction You Say ?"); } } }