Salesforce Platform Developer I (legacy) — Question 11
What are three characteristics of static methods? (Choose three.)
Answer options
- A. Initialized only when a class is loaded
- B. A static variable outside of the scope of an Apex transaction
- C. Allowed only in outer classes
- D. Allowed only in inner classes
- E. Excluded from the view state for a Visualforce page
Correct answer: A, C, E
Explanation
The correct options A, C, and E highlight the behavior of static methods, indicating they are initialized upon class loading, are restricted to outer classes, and do not participate in the view state of Visualforce pages. Options B and D are incorrect as they misrepresent the scope and usage of static methods in Apex.