I know that this refers to a current object. But I do not know when I really need to use it. For example, will be there any difference if I use x i
this
x
"this" is also useful when calling one constructor from another:
public class MyClass { public MyClass(String foo) { this(foo, null); } public MyClass(String foo, String bar) { ... } }