오버라이딩 시 자식 클래스는 부모 클래스의 메서드보다 많은 수의 예외를 선언할 수 없다. class Parent { void parent() throws IOException, SQLException { // Code stuff... } } class Child extends Parent { @Override void parent() throws IOException { // Code stuff... } } Child 클래스의 parent 메서드에 선언된 예외의 개수가 부모인 Parent 클래스의 parent 메서드에 선언된 예외의 개수보다 적으므로 올바르게 오버라이딩 되었다. class Parent { void parent() throws IOException, SQLException { // Code.....
원문 링크 : Java Overriding 주의점