A particular instance method defined as, public void boozy(int level) throws DrunkException { ...} DrunkException is rel
Posted: Sun May 15, 2022 11:59 am
A particular instance method defined as,
public void boozy(int level) throws
DrunkException
{ ...}
DrunkException is related to Exception as shown in the
diagram.
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
public void boozy(int level) throws
DrunkException
{ ...}
DrunkException is related to Exception as shown in the
diagram.
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