Initializing New Class With Inheritance
<p>Can someone explain the differences between these three declarations.</p>

<p><code>Animal var = new Dog()</code></p>

<p><code>Dog var = new Dog()</code></p>

<p><code>Dog var = new Animal()</code></p>

<p>The second declaration is most used, but I don't understand what role the left class has vs the right class, or when you use one vs the other.</p>

<p>The assumption is Dog extends Animal.</p>