Exam 1z0-809 All QuestionsBrowse all questions from this exam
Question 204

Given:

and the code fragment:

What is the result?

    Correct Answer: A

    The output of the given program will be 'User is registered.' Based on the provided conditions in the `doRegister` method, the name 'Mathew' has a length greater than 5, and the age 60 does not exceed the limit of 60. Therefore, none of the exceptions are thrown, and the user is successfully registered.

Discussion
jduarteOption: A

Answer A. Tested

DarGrinOption: A

Answer is A

steefaandOption: A

A is correct.

iSnoverOption: A

The answer is A, because the object has a name greater than 5 and its age is not greater than 60.

WilsonKKerllOption: A

If the Code is throw new AgeOutOfLimitException(); Answer is A.

petetsaiOption: D

answer is D, throw Exception without "new" keyword