nerdexam
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)
  • A
    5% (2)
  • B
    8% (3)
  • C
    13% (5)
  • D
    74% (29)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice