this keyword in java
- 17th Aug 2017
- 0
- 3023
- how to use this keyword in java importance of this keyword in java significance of this keyword in java this keyword in java this keyword in java with an example when to use this keyword in java why do we need dependency injection with real world example
The “this” keyword is used to refer to the current instance of a class. Example: public class Employee { int age; public Employee(int age) { this.age = age; } private void displayEmployee(){ System.out.println("Employee’s age : " + this.age); } public […]