nerdexam
Salesforce

PDII · Question #85

A developer has written the following method: static void processList(List<sobject> input){ Which code block can be used to call the method?

The correct answer is D. for Account acc : [SELECT Id, Name FROM Account]). See the full explanation below for the reasoning.

Question

A developer has written the following method:

static void processList(List<sobject> input){ Which code block can be used to call the method?

Options

  • AprocessList (acc)
  • BprocessList ([FIND 'Acme" 'RETURNING Account])
  • CprocessList([SELECT Id, Name FROM sObject WHERE Type = 'Account'])
  • Dfor Account acc : [SELECT Id, Name FROM Account])

How the community answered

(28 responses)
  • A
    14% (4)
  • B
    7% (2)
  • C
    7% (2)
  • D
    71% (20)

Community Discussion

No community discussion yet for this question.

Full PDII Practice