1 package com.twisters; 2 class Base { 3 public void test() throws Exception { 4 System.out.println("Base Exception"); 5 throw new Exception("Base Exception"); 6 } 7 } 8 9 public class Child extends Base{ 10 public void test() { 11 System.out.println("Child has no Exception"); 12 } 13 14 public static void main(String [] args) { 15 Base base = new Child(); 16 base.test(); 17 18 Child child = new Child (); 19 child.test(); 20 } 21 }