Reference to Classes in Java
<p>I was doing inorder traversals when in the solution I came across the following lines:</p>

<pre><code>stack.push(current);
current = current.left;
</code></pre>

<p>Now my question is that when I push current into the stack and make <code>current = current.left;</code> then will the node that is there within the <code>stack</code> also change to <code>current.left</code>? In my case, the current in the <code>stack</code> still points to the original <code>current</code> but the <code>current</code> variable does point to <code>current.left</code>. Why is this?</p>