/*File Excep13.java Copyright 2002, R.G.Baldwin Tested using JDK 1.4.0 under Win2000 **************************************/ import java.lang.Thread; class Excep13{ public static void main( String[] args){ Excep13 obj = new Excep13(); try{//begin try block obj.myMethod(); }catch(InterruptedException e){ System.out.println( "Handle exception here"); }//end catch block }//end main //---------------------------------// void myMethod() throws InterruptedException{ Thread.currentThread().sleep(10000); }//end myMethod }//end class Excep13