Valid CRT-450 Dumps shared by ExamDiscuss.com for Helping Passing CRT-450 Exam! ExamDiscuss.com now offer the newest CRT-450 exam dumps, the ExamDiscuss.com CRT-450 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com CRT-450 dumps with Test Engine here:
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?
Correct Answer: D
To mark each Account in a List<Account> as either Active or Inactive based on the LastModified field value being more than 90 days, the developer should use a for loop, with an if/else statement inside. This technique allows the developer to iterate over the list of accounts, check the condition for each account, and update the field value accordingly. A switch statement is not suitable for this scenario, because it can only compare one expression with a set of constant values, not a range of values or a date calculation. An if/else statement without a for loop would not be able to process the entire list of accounts, only one account at a time. References: * : Loops * : Switch Statements * : If-Else Statements