Font Awesome Icons


this keyword in Java

this keyword in java

“this” keyword is used in many contexts but we will discuss the most common usage.
“this” keyword is used to refer current class instance variable and is also used to invoke the current class constructor.


class Employee
int id;
String name;
Employee(int id,String name)
{ = id; = name;
void show()
System.out.println(id+” “+name);
public static void main(String args[])
Employee e1 = new Employee(256,”James”);
Employee e2 = new Employee(256,”Gosling”);;;

Hi, Welcome to etechvidya