exam questions

Exam 1z0-819 All Questions

View all questions & answers for the 1z0-819 exam

Exam 1z0-819 topic 1 question 123 discussion

Actual exam question from Oracle's 1z0-819
Question #: 123
Topic #: 1
[All 1z0-819 Questions]

Given the code fragment:



How many lines of text does this program print?

  • A. four
  • B. one
  • C. three
  • D. two
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ASPushkin
1 month, 3 weeks ago
Selected Answer: D
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
upvoted 1 times
...
Omnisumem
9 months, 1 week ago
Selected Answer: D
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!" ); }}
upvoted 1 times
...
Stavok
11 months, 3 weeks ago
Selected Answer: D
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.
upvoted 2 times
...
Jtic
1 year, 4 months ago
Selected Answer: D
Exeception 1 Finally Block
upvoted 1 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago