posted 23 years ago
Hi,
When you override a method, the overriding method cannot throw any checked exception not thrown by the overriden one.
So if a method m() in class Super throws a IOException and we override m() in class Sub that extends Super, then if m() in Sub declares that throws any checked exception, they have to be IOException or a subclass of it.
So the method in Sub3 is ok