Weekend Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Exam PDI All Questions
Exam PDI All Questions

View all questions & answers for the PDI exam

Salesforce Developers PDI Question # 7 Topic 1 Discussion

PDI Exam Topic 1 Question 7 Discussion:
Question #: 7
Topic #: 1

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.