New course! Every coder should learn Generative AI!
Try a free lesson0
what is the use of this.color in reference to the topic getter and setter???
2 Answers
+ 3
The keyword "this" is used to refer to the current object. Fundamentally this.color is the color attribute of the current object.
I hope it is helpful...
0
this keyword is self reference pointer by using this you can point point the address of the variable and get valued