public class Tester {
static int x = 4;
public Tester() {
System.out.print(this.x); //no error
Tester();
}
public static void Tester() { // line 8
System.out.print(this.x); // compilation error
}
public static void main(String... args) { // line 12
new Tester();
}
In this example how can we access a static variable using this keyword inside constructor. But not in methods. this is keyword for current object reference, is n't it?