Exam 1z0-819 All QuestionsBrowse all questions from this exam
Question 49

Given:

and the code fragment:

What is the result?

    Correct Answer: C

    The given code will first check if the string 'param1' equals 'oracle' ignoring case sensitivity. Since 'param1' is set to 'Oracle', this evaluation will be true. Hence, it will throw an instance of 'ExSub' with error code 9001, message 'APPLICATION ERROR-9001', and a cause of new FileNotFoundException('MyFile.txt'). The 'catch' block catches this exception and calls 'getMessage' on it. This method constructs the error message based on 'eCode', 'super.getMessage()', and 'this.getCause().getMessage()'. The resulting output will be '9001: APPLICATION ERROR-9001-MyFile.txt'.

Discussion
d7bb0b2Option: C

C: 9001: APPLICATION ERROR-9001-MyFile.txt

OmnisumemOption: C

Tested: C.

tmuralimanoharOption: C

Answer: C

StavokOption: D

public class ExSub extends ExSuper{ Compilation actually fails on this line,you can't have 2 public classes in the same file... However,if we neglect this,I think C would be the correct answer.

Mukes877Option: C

C is correct because If block will be called and message will print.

ObaltOption: C

The correct answer is C

TADIEWAOption: A

A correct