Notes
In Apex, the this
keyword refers to the current instance of the class in which it is used. It is a reference to the object on which the method was invoked or the variable was accessed. The this
keyword is commonly used in object-oriented programming languages to distinguish instance variables from local variables when they have the same name.
Here's a basic example to illustrate the use of the this
keyword in Apex:
public class MyClass {
private String myString;
public void setMyString(String newString) {
this.myString = newString;
}
public String getMyString() {
return this.myString;
}
}
Video
Video does not exists.