CRT-450 Exam QuestionsBrowse all questions from this exam

CRT-450 Exam - Question 89


Which message is logged by the code below?

Show Answer
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

3 comments
Sign in to comment
chucksbackOption: B
Sep 17, 2023

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

danielVenturaOption: C
Dec 20, 2023

C - Correct

IOANABUZOption: C
Jul 8, 2024

tested in anonymous, c is correct