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)- A14% (4)
- B7% (2)
- C7% (2)
- D71% (20)
Community Discussion
No community discussion yet for this question.