nerdexam
SalesforceSalesforce

PDI · Question #134

PDI Question #134: Real Exam Question with Answer & Explanation

Sign in or unlock PDI to reveal the answer and full explanation for question #134. The question stem and answer options stay visible for context.

Submitted by akirajp· Apr 18, 2026Logic and Process Automation

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

Unlock PDI to see the answer

You've previewed enough free PDI questions. Unlock PDI for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Apex Control Flow#For Loop#If/Else Statement#List Processing
Full PDI PracticeBrowse All PDI Questions