Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce DEX-450 Exam - Topic 6 Question 127 Discussion

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?
C) A for loop, with an if or if/else statement inside
A) An if-else statement, with a for loop inside
B) A witch statement, with a for loop inside
D) A for loop, with a switch statement inside

Salesforce DEX-450 Exam - Topic 6 Question 127 Discussion

Actual exam question for Salesforce's DEX-450 exam
Question #: 127
Topic #: 6
[All DEX-450 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
Herman
1 month ago
I’m a bit confused about the switch statement. I don’t think it’s the right choice for this scenario since we’re checking a date condition, right?
upvoted 0 times
...
Gerald
1 month ago
I remember practicing a similar question where we had to check conditions inside a loop. I feel like option C makes the most sense here.
upvoted 0 times
...
Ayesha
2 months ago
I think we might need to use a for loop to iterate through the List, but I'm not sure if we should use an if statement or a switch statement for checking the date.
upvoted 0 times
...

Save Cancel