static members behavior in java
<p>I am confused with be below behaviour in Java, I know that static inheritance is not possible Java then how I am able to call on B class static members of A?</p>

<pre><code>public  class A {
  static int staticVariable = 5;
  public static void staticMethod(){
  System.out.println("A");
 }
}
public class B extends A{}
public class C {
    public static void main(String[] args) {
      A.staticMethod();
      B.staticMethod();
      System.out.printf("A's int value %d and B's int value is %d",A.staticVariable,B.staticVariable);
    }
}
</code></pre>

<p>output:</p>

<pre><code>A
A
A's int value 5 and B's int value is 5
</code></pre>
