+ 2

What is the feature of this keyword in java?

25th Feb 2017, 1:46 PM
Anirudh Ramasami
Anirudh Ramasami - avatar
3 Antworten
+ 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 } }
25th Feb 2017, 3:35 PM
Tashi N
Tashi N - avatar
+ 3
it have current irration value
25th Feb 2017, 3:12 PM
Learning Coding From ABC
Learning Coding From ABC - avatar
+ 1
its a kind of local reference to variable inside particular function /method.
25th Feb 2017, 1:48 PM
kumar Saurav
kumar Saurav - avatar