Explain Variable and Method Access Modifiers in salesforce?



Explain Variable and Method Access Modifiers in salesforce?..

Answer / Durgesh Kumar Gupta

Access Modifiers in Salesforce determine the accessibility level of variables and methods. There are four access modifiers: Public (Public), Private (private), Protected, and Static Global (static). Public allows access from anywhere, while Private is only accessible within the class, and Protected can be accessed by subclasses or within the same class. Static Global refers to a variable that is shared among all instances of the class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

What are the differences between 15 and 18 digit record ids?

1 Answers  


What is an Auto-Response Rule?

1 Answers  


Explain the skinny table. What are the considerations for skinny table?

1 Answers  


How to identify a class as a test class in salesforce?

1 Answers  


Difference between isblank and isnull?

1 Answers   Cognizant,


Mention what is the difference between isnull and isblank?

1 Answers  


What is conditional highlighting in salesforce reports? State some limitations.

1 Answers  


How many types of dashboards are there in salesforce?

1 Answers  


What are the global key words? : salesforce visualforce

1 Answers  


Write a syntax and structure of scheduler class?

1 Answers  


What do you know about apex?

1 Answers  


Difference between Trigger.new & Trigger.old?

1 Answers   Accenture,


Categories