What is ID type in Salesforce?
Salesforce IDs are often represented by 15-character, base-62, strings. Each of the 15 characters can be a numeric digit (0-9), a lowercase letter (a-z), or an uppercase letter (A-Z). These 15-character IDs are case-sensitive. 18-character IDs are case-safe, but not case-insensitive.
What is keyword in Salesforce?
This keyword defines a method/variable that is only initialized once and is associated with an (outer) class, and initialization code. We can call static variables/methods by class name directly. No need of creating an instance of a class.
What is virtual keyword in Salesforce?
virtual. This keyword Defines a class or method that allows extension and overrides. You can’t override a method with the override keyword unless the class or method has been defined as virtual.
What is keyword in Apex?
Apex provides the keywords final , instanceof , super , this , transient , with sharing and without sharing .
What is Instanceof in Salesforce?
If you need to verify at run time whether an object is actually an instance of a particular class, use the instanceof keyword. The instanceof keyword can only be used to verify if the target type in the expression on the right of the keyword is a viable alternative for the declared type of the expression on the left.
What is the use of override keyword in Salesforce?
Overriding a virtual method allows you to provide a different implementation for an existing method. This means that the behavior of a particular method is different based on the object you’re calling it on.
What is override method in Salesforce?
It is an object-oriented programming that enables the child class to provide a different implementation for a method that is already implemented in its parent class. This is possible through only inheritance.
Why do we use static keyword in Apex?
A static method is used as a utility method, and it never depends on the value of an instance member variable. Because a static method is only associated with a class, it can’t access the instance member variable values of its class. A static variable is static only within the scope of the Apex transaction.
What is the use of final keyword in Salesforce?
The final keyword means that the variable can be assigned at most once, either in the declaration itself, or with a static initializer method if the constant is defined in a class. This example declares two constants. The first is initialized in the declaration statement.