Page 1 of 1

A particular instance method defined as, public void boozy(int level) throws DrunkException { ...} DrunkException is rel

Posted: Sun May 15, 2022 11:59 am
by answerhappygod
A particular instance method defined as,
public void boozy(int level) throws
DrunkException
{ ...}
DrunkException is related to Exception as shown in the
diagram.
A Particular Instance Method Defined As Public Void Boozy Int Level Throws Drunkexception Drunkexception Is Rel 1
A Particular Instance Method Defined As Public Void Boozy Int Level Throws Drunkexception Drunkexception Is Rel 1 (2.81 KiB) Viewed 74 times
Which catch will properly catch a thrown
DrunkException?
A) catch(RuntimeException re){...}
B) catch(ArrayIndexOutOfBoundsException ae){...}
C) catch(Exception error){...}
D) All of the catches will properly catch DrunkenException
E) None of the catches will work.
java.lang.Exception DrunkException