1z0-809 Exam QuestionsBrowse all questions from this exam

1z0-809 Exam - Question 204


Given:

and the code fragment:

What is the result?

Show Answer
Correct Answer: AB

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

6 comments
Sign in to comment
jduarteOption: A
Feb 8, 2021

Answer A. Tested

petetsaiOption: D
Jan 10, 2022

answer is D, throw Exception without "new" keyword

WilsonKKerllOption: A
Mar 21, 2022

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

iSnoverOption: A
Feb 7, 2024

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

steefaandOption: A
Feb 7, 2024

A is correct.

DarGrinOption: A
Jun 7, 2024

Answer is A