Why is the keyword this. used in the @ovrerride method? Java language families
I don’t quite get it and I thought the this. keyword refers to the instances variables of the original class.
Why is the keyword this. used in the @ovrerride method? Java language families
I don’t quite get it and I thought the this. keyword refers to the instances variables of the original class.
Specifically what’s the example using this
? But yes, this
is a handle to the instance.
Please don’t post CGPT replies as it violates the community guidelines.
refers to members of the current “this” class where “you” are/are working (inheriting). So when
a class has a data variable and
a method also has a data variable
this.data refers to the class variable and
the data refers to the local variable