The keyword refers to the current object. Following code sample shows how to use this keyword in constructor.



Java Code:
public class Test
{
private int id;
private String name;

public Test(int id, String name)
{
this.id = id;
this.name = name;
}
...
}