nerdexam
Salesforce

CRT-450 · Question #134

A developer wants to mark each Account in a List<Account> as either or Inactive based on the LastModified field value being more than 90 days. Which Apex technique should the developer use?

The correct answer is D. A for loop, with an if/else statement inside. See the full explanation below for the reasoning.

Question

A developer wants to mark each Account in a List<Account> as either or Inactive based on the LastModified field value being more than 90 days. Which Apex technique should the developer use?

Options

  • AA for loop, with a switch statement inside
  • BA Switch statement, with a for loop inside
  • CAn If/else statement, with a for loop inside
  • DA for loop, with an if/else statement inside

How the community answered

(28 responses)
  • A
    18% (5)
  • B
    4% (1)
  • C
    7% (2)
  • D
    71% (20)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice