class exX extends Exception {}
class exY extends Exception {}
class exZ extends Exception {}

class classA {
     void methodA() throws exX, exY{
         // method body
     }
}

 
class classB extends classA {    
     void methodA() throws exX {               // can throw less exceptions
        // method body
    }
}    
    
class classC extends classA {
    void methodA() throws exX, exY, exZ {     // illegal
      // method body
    }
}
