title: Why is the superclass designated initializer getting called by default?
body: <p>I am new to Swift and getting some problem regarding initializers. I have created a Swift file with the following code :</p>
  
  <pre><code>import Foundation
  
  class SuperClass
  {
      var a : Int
      init()
      {
          a = 10
          print("In Superclass")
      }
  }
  
  class SubClass : SuperClass
  {
      override init()
      {
          print("In Subclass")
      }
  }
  </code></pre>
  
  <p>In the above code, <code>init()</code> of <code>SubClass</code> does not contain call to <code>init()</code> of <code>SuperClass</code> i.e. there is no <code>super.init()</code> in <code>SubClass init()</code>.</p>
  
  <p>So my question is: </p>
  
  <p><strong>1.</strong> Why is it not giving any error if I don't call designated <code>init()</code> of <code>SuperClass</code></p>
  
  <p><strong>2.</strong> If I am creating an object of <code>SubClass</code> i.e. <code>let s = SubClass()</code>, the output is :</p>
  
  <pre><code>In Subclass
  
  In Superclass
  </code></pre>
  
  <p>Why the <code>init()</code> of <code>SuperClass</code> is getting called? Does a subclass init() calls the superclass init() by default?</p>