import java.util.Date;


public class DemoException {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		//try {
		    method1();
		//}
	//	catch (Error e) {
	//		System.out.println("catching error");
	//	}

	}

	private static void method1() {
		// TODO Auto-generated method stub
		
		Date d = null;
		
		//d.toString();
		
		 int i;
		try {
			System.out.println("Before");
		    i = 7 / 0;
		    System.out.println("After");
		}
		catch (ArithmeticException ae) {
			System.out.println("catch");
			i = 10000000;
			throw new Error();
		}
		finally {
		  System.out.println("finally");
		}
		
		
	}

}

