Salesforce Certified Platform Developer (Plat-Dev-201) PDI Question # 33 Topic 4 Discussion

Salesforce Certified Platform Developer (Plat-Dev-201) PDI Question # 33 Topic 4 Discussion

PDI Exam Topic 4 Question 33 Discussion:
Question #: 33
Topic #: 4

A developer has an integer variable called maxAttempts. The developer needs to ensure that once maxAttempts is initialized, it preserves its value for the length of the Apex transaction; while being able to share the variable's state between trigger executions.

How should the developer declare maxAttempts to meet these requirements?


A.

Declare maxattempts as a constant using the static and final keywords.


B.

Declare maxattempts as a member variable on the trigger definition.


C.

Declare maxattempts as a variable on a helper class.


D.

Declare maxAttempts as a private static variable on a helper class.


Get Premium PDI Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.