This
public class ThisDemo
{
int x=100;
int y=200;
public void display(int x,int y)
{
System.out.println(x); // displays 10,20
System.out.println(y);
System.out.println(this.x); // To access the class level variables we can use this keyword
System.out.println(this.y);
}
public static void main(String[] args)
{
ThisDemo t=new ThisDemo();
t.display(10,20);
}
}
Output:
10
20
100
200