I was going through Java inheritance and I tried the following code

```
class A {
    public int x = 1;

    public void print1() {
        System.out.println("Print from A");
    }
}

class B extends A {
    public int x = 2;

    public void print1() {
        System.out.println("Print from B");
    }
}

class C extends B {
    public int x = 3;

    public void print1() {
        System.out.println("Print from C");
    }

    public static void main(String aa[]) {
        C c = new C();
        ((A) c).print1();
        System.out.println(c.x);    
        System.out.println(((A) c).x);          
    }
}

```

The output was 

> 
> Print from C  
> 
>  3  
> 
>  1
> 
> 
> 

Now, my question is that I am able to access `class A member x` from `class C instance c` but why am I not able to access the `class A method print1()`. I know, if I want I can call `new A().print1();`. But, I want to access it from an instance of class C directly. So by overriding methods, are the top parent class methods lost in the bottom child class? However, the parent class members are retained (although hidden). Why so? And is there a way to call a method from class `A` in class `C` without creating an instance of `A`?