title: learn the syntax for constructors in Kotlin
body: <p>I am learning Kotlin programming language perfectly. I try to write code in different patterns and try to understand. However, I did not understand the thing. Can you help me, please?
  Here it is:</p>
  <pre><code>open class Parent {
      open val foo = 1
      init {
          println(foo)
      }
  }
  class Child: Parent() {
      override val foo =2
  }
  fun main() {
      Child()
  }
  </code></pre>
  <p>In this code, <strong>0</strong> is the output. How will this be?</p>