class ClassA { static void met(){ System.out.println("ClassA static!"); } } class ClassB extends ClassA { static void met() throws Exception { System.out.println("ClassB static!"); } } class Samp06 { public static void main(String[] args){ ClassA.met(); ClassB.met(); } }