object vs instance vs reference in java
<p>Can anyone explain what is the difference between object vs instance vs reference, with a good example?</p>

<p>I'm confused about this part:</p>

<ol>
<li><code>( classA a;<br>
 a = new classA();  )</code></li>
<li><code>( classA a;<br>
 a = new classB();  )</code></li>
<li><code>( classA a;<br>
 classB a = new classB();  )</code></li>
</ol>