Question
1
/ 16
--:--
Question 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
Reveal Answer
Correct Answer
Correct Answer:
You're on the free plan. Get Full Exam Access
Unlock all questions, detailed explanations and more.
Get Premium →
Next
Overview
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Answered
Skipped
Not visited
End & Review