What is this keyword?

534    Asked by ElizabethClark in Salesforce , Asked on Feb 10, 2020
Answered by Elizabeth Clark

Sometimes a function or method will need to refer to the object that invoked it. 'this' keyword can be used inside any method to refer to the current object.

Example :-

box(double width, double height, double depth){

this.width= width;

this.height=height;

this.depth=depth;

}



Your Answer

Interviews

Parent Categories