30 Sep 2014
this keyword in java
this keyword in java
In this article we will learn about this keyword in java.
- By using this keyword, you can refer any member (hidden variables, data fields, constructors, methods) of the current object.
- A very genuine reason to use this keyword in java because a field is hidden or shadowed by the another constructor or method parameter
- In other words you can say, this keyword is used to highlight the hidden data fields of an object. Utilizing the similar name of method or contructor parameters hides the current object data fields
No Responses