title: how to access parent class variable from child if it is overriden it in child class in kotlin
body: <p>I want to access animals class color from dogs reference<br>
  as I am new to kotlin if something is wrong guide me</p>
  <pre><code>fun main() {
  
      var dogs = Dogs(&quot;pug&quot;)
      println(&quot;Color of Dog :${dogs.color}&quot;)//Black
      println(&quot;Color of Animal:${}&quot;)//White
  }
  
  private open class Animals {
      open var color: String = &quot;White&quot;
  }
  
  private class Dogs(var breed: String) : Animals() {
      override var color: String = &quot;Black&quot;
  }
  </code></pre>