Make your own free website on Tripod.com
 1:class trytest
 2:{
 3:    public static void main(String arg[])
 4:    {
 5:       block :
 6:       {
 7:               try{
 8:                       int i=0;
 9:                       i++;
10:                       Exception t=null;
11:                       //throw t; //this allows ends up throwing a NullPointerException
12:                       throw null; //same with this
13:               }
14:               catch(Exception e)
15:               {
16:                       System.out.println("caught");
17:                       System.out.println(e);
18:               }
19:               finally
20:               {
21:                       System.out.println("in finally");
22:               }
23:               System.out.println("this is a test");
24:       }
25:     }
26: }
27: