Exam CRT-450 All QuestionsBrowse all questions from this exam
Question 89

Which message is logged by the code below?

    Correct Answer: C

    The code tries to insert an Account object before any initialization, which will result in a null pointer because 'a' is not instantiated. Consequently, when accessing 'a.Id', it will throw a NullPointerException. Therefore, the message 'NullPointer Exception' will be logged.

Discussion
chucksbackOption: B

Look at the order of the code. You are attempting to insert before the Account record has been added to the list.

danielVenturaOption: C

C - Correct

IOANABUZOption: C

tested in anonymous, c is correct