METHOD OVERRIDING WITH EXCEPTION

Method Overriding With Throws Keyword


javapadho
Exception when compiler recognized
  • Method overriding only possible when throws present either in subclass throw present but in subclass throws is not present than program not compile.

  • Method overriding throws Class should be same checked exception or should be super class also same checked exception type.

  • Checked type exception not present is super class and checked exception present is sub class than not possible to throws use.

javapadho
Exception when compiler recognized
javapadho
Exception when compiler recognized
javapadho
Exception when compiler recognized