- #1
pairofstrings
- 411
- 7
Hello everyone. I want explanation of the working of 'this' keyword in java. I read articles but couldn't understand. Please help me here. I don't understand what objects and variables they are talking about. Also give me an example of what object, variable, instance variable is.
Box(double w, double h, double d) {
this.width = w;
this.height = h;
this.depth = d;
In the above example, is width height depth an object or variable?? Explain me the 'this' keyword here please.
Box(double w, double h, double d) {
this.width = w;
this.height = h;
this.depth = d;
In the above example, is width height depth an object or variable?? Explain me the 'this' keyword here please.