A developer wants to mark each Account in a List as either Active or Inactive, based on the value in the LastModified each Account being greater than 90 days in the past.
Which Apex technique should the developer use?
A.
An if-else statement, with a for loop inside
B.
A witch statement, with a for loop inside
C.
A for loop, with an if or if/else statement inside
Using aforloop allows iterating through the list, and aniforif-elsecondition inside can evaluate theLastModifiedDatefor each account to determine its status.
Apex Control Statements
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit