Q11
An unchecked
exception occurs in a method dosomething(). Should other code be added in the
dosomething() method for it to compile and execute?
A.
The Exception must be caught
The Exception must be caught
B.
The Exception must be declared to be thrown.
The Exception must be declared to be thrown.
C.
The Exception must be caught or declared to be thrown.
The Exception must be caught or declared to be thrown.
D.
No other code needs to be added.
No other code needs to be added.
I think response is C, because it need compile and run. If it only were compile the reponse would be D.
RispondiEliminayou're right.
RispondiElimina