public class A {
    private int x = 0;
    public int y = 1;
    public void m() {
        A a = new A();
        // Note that the object executing the method
        // may be different from the object a
        // but both objects are of class A.
        int tmp1 = a.x;
        int tmp2 = a.y;
    }
}