class ExpF {
    public static void main(String[] arg) throws Exception {
    	try {
    	    switch (Integer.parseInt(arg[0])) {
    	        case 1: throw new ArithmeticException();
    	        case 2: throw new ClassCastException();
    	        case 3: throw new Error();
    	    }
    	    System.out.println("End of try block");
    	} catch (ArithmeticException e) {
    	    System.out.println("An ArithmeticException is caught");
    	} catch (Exception e) {
    	    System.out.println("An Exception is caught");
    	    throw e;
    	} finally {
    	    System.out.println("Here is finally block");
    	}
    	System.out.println("End of main()");
    }
}

