The throws is part of the method signature, and to override a method, an overriding method must have the same signature as the override method.
Therefore, if class B extends class A and A defines:
public void foo (int param) throws SomeException { .... if (something) throw new SomeException (); .... }
Then B can only redefine foo using the same signature:
public void foo (int param) throws SomeException { super.foo(param); .... if (something) throw new SomeOtherException (); .... }
SomeOtherException must be a subclass of SomeException , because it is the type of exception that the method signature allows you to sign. If the override method tries to throw an exception of the type that is the SomeException , this will violate the method's contract.
Let declare a hierarchy of classes of classes of exceptions:
SuperException SomeException SomeOtherException AnotherSomeException
What you offer ( Java allows parent class method to have checked exception which is child to the child class method checked exception ) will allow the overriding method in the child class to throw any SuperException exceptions that would allow it to throw AnotherSomeException . This violates the method signature because AnotherSomeException not a subclass of SomeException .
To expand on my comment, let's look at what happens if Java allows what you offer.
Suppose class C has a method bar , which takes an instance of class A and calls foo .
public class C { .... public void bar (A a) { try { a.foo (); } catch (SomeException ex) { .... } } }
Since foo SomeException throw SomeException , any code that calls foo must handle this exception or declare that it can throw this exception. Now, if Java allows B override foo , but changes its declaration to public void foo() throws Exception , the implementation of foo in B can throw any subclass of the Exception class. Since bar does not even know that B exists, it does not know that it should catch any exception other than SomeException and its subclasses. Therefore, the compiler cannot mark this code as an error, but if the calling bar object passes an instance of B , the code will become invalid only at runtime, since it can throw a checked exception that is neither caught nor declared by bar . Therefore, Java does not allow changing the throws when overriding a method.