title: Constructor call
body: <p>I have three classes:</p>
  
  <pre><code>public class A {
      public A(){
          System.out.println("in A");
      }
  }
  
  
  public class B extends A{
  
      public B(){
          System.out.println("in b");
      }
  } 
  
  
  public class C extends B{
  
      public C(){
          System.out.println("in C");
      }   
  }
  </code></pre>
  
  <p>Now I am really not sure how the constructor calls work.
  If I instantiate <code>C c= new C();</code>, in what order (and why that order) does the constructors get called.
  If I instantiate the class C, then should not it just check if the class C has got any constructor or not and if it does, it shall use it? </p>
  
  <p>Why does it output-> In A  In B  In C?</p>
  
  <p>Doesn't it go up in the hierarchy only when it doesn't find the constructor in it's own class? Or the constructors of the super class are called implicitly every time?</p>