1 package test;2 import java.io.IOException ;3 4 public class OverrideTypedException<T extends Throwable > {5 6 public void test() throws T {7 8 }9 10 public static class Test1 extends OverrideTypedException<IOException > {11 12 }13 14 public static class Test2<E extends RuntimeException > extends OverrideTypedException<E> {15 16 }17 18 }19