exam questions

Exam 1z0-803 All Questions

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

Exam 1z0-803 topic 1 question 104 discussion

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

View the exhibit.

Given the code fragment:

Which change enables the code to print the following?

James age: 20 -

Williams age: 32 -

  • A. Replacing line 5 with public static void main (String [] args) throws MissingInfoException, AgeOutofRangeException {
  • B. Replacing line 5 with public static void main (String [] args) throws.Exception {
  • C. Enclosing line 6 and line 7 within a try block and adding: catch(Exception e1) { //code goes here} catch (missingInfoException e2) { //code goes here} catch (AgeOutofRangeException e3) {//code goes here}
  • D. Enclosing line 6 and line 7 within a try block and adding: catch (missingInfoException e2) { //code goes here}
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
Tatudev
1 year, 1 month ago
Selected Answer: A
Answer is A
upvoted 1 times
...
Nate88890123
2 years, 11 months ago
Selected Answer: B
C is wrong because 2nd and 3rd catch clauses are unreachable
upvoted 1 times
...
Nate88890123
2 years, 11 months ago
Correct answer is B
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