lets say NoMatchExcepton extends Exception
pay attention to two things :
multi-catch exceptions can not be subclassed
order of catch blocks subclass before superclass
Evrth is ok with that
So just two lines are printed
Tested: D. Example of NoMatchException as custom exception class could be:
class NoMatchException extends Exception {
public static void main(String args[])
{ System.out.println("No Match Exception Caught!" ); }}
The code provided is missing the definition of the NoMatchException class. If we assume that NoMatchException is a custom exception class that extends Exception or RuntimeException, then the code will compile and run without any issues.
The first catch block will catch this exception and print "Exception 1" to the console. After that, the finally block will be executed, printing "Finally Block" to the console.
This section is not available anymore. Please use the main Exam Page.1z0-819 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ASPushkin
5 months, 3 weeks agoOmnisumem
1 year, 1 month agoStavok
1 year, 3 months agoJtic
1 year, 8 months ago