title: static keyword in Java
body: <pre><code>class A {
      static {
          System.out.println("A-SIB");
      }
      static void test(){
          System.out.println("A-test");
      }
  }
  
  class B extends A  {
      static {
          System.out.println("B-SIB");
      }
  }
  
  class C  {
      public static void main(String args []){
          B.test();
      }
  }
  </code></pre>
  
  <p>When I ran class C, I thought <code>A-SIB</code>, <code>B-SIB</code> and <code>A-test</code> will be printed, but <code>B-SIB</code> was not there in the output. Can somebody explain why?</p>