title: Java constructor inheritance?
body: <p>I always thought that constructors aren't inherited, but look at this code:</p>
  
  <pre class="lang-java prettyprint-override"><code>class Parent {
      Parent() {
          System.out.println("S1");
      }
  }
  
  class Child extends Parent {
      Child() {
          System.out.println("S2");
      }
  }
  
  public class Test5 {
      public static void main(String[] args) {
          Child child = new Child();
      }
  }
  
  //RESULT:
  //S1
  //S2
  </code></pre>
  
  <p>It shows that Child inherited constructor. Why there is S1 on result? Is there any possibility to create 2 constructors without parameters and have only Child constructor on result without base constructor (only S2)?</p>