This is because they are of the same class. This is allowed in Java.
You will need this access for many purposes. For example, when implemented, it is equal to:
public class A { private int i; @override public boolean equals(Object obj){ if(obj instanceof A){ A a = (A) obj; return ai == this.i;
source share