If you call a method that throws an exception the programmer must
1) wrap the call to the method in a try statement
and catch the exception OR
2) ensure the calling method throws the same Exception
as the method that is being called.
I have read the following theory with respect to Exceptions.
I need the following statement confirmed.
Proposition:
Whether a call needs to be
1) wrapped in a 'try-catch' block or
2) whether the enclosing method requires a throws clause
depends on the class of reference and not the class of the actual object.
Can someone confirm if the above proposition is true or false?