+ 2
What is the feature of this keyword in java?
3 Respuestas
+ 5
this refers to the current object. It is often used in constructors to not mix up class attributes with parameters, e. g.:
class my class{
private int i;
public myClass (int i) {
this.i=i; // assigns the parameter i to
// class attribute i
}
}
+ 3
it have current irration value
+ 1
its a kind of local reference to variable inside particular function /method.