Exceptions
- A first version of Increment without any exception :
- In the second version, we want to add an exception in the
method m() of IncrementImpl.
It is not possible except if :
- we add also the declaration of this exception in the
interface Increment :
- this exception is an instance of RuntimeException :
- Example of use of try ... catch ... finally
- First example : to show that the order of the catch
depends of the inheritance of the Exceptions
- Correction of the first example : only the main method of
MyClass has changed