Salesforce
CRT-450 · Question #181
Given the following Apex statement: What occurs when more than one Account is returned by the SOQL query?
The correct answer is D. An unhandled exception is thrown and the code terminates. See the full explanation below for the reasoning.
Question
Given the following Apex statement:
What occurs when more than one Account is returned by the SOQL query?
Options
- AThe query falls and an error Is written to the debug log.
- BThe variable, nvAccount, Is automatically cast to the List data type.
- CThe first Account returned Is assigned to myAccour.t.
- DAn unhandled exception is thrown and the code terminates.
How the community answered
(39 responses)- A5% (2)
- B8% (3)
- C13% (5)
- D74% (29)
Community Discussion
No community discussion yet for this question.