Basic Memory Model Diagram for Node Class (Java)
<p>I have a question to draw the memory model diagram for the code below:
<a href="https://i.stack.imgur.com/xlLOq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xlLOq.png" alt="Question"></a></p>

<p>With the given answer here:
<a href="https://i.stack.imgur.com/ioTPJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ioTPJ.png" alt="Answer"></a></p>

<p>My question is why is the value for next stored inside the box while the values for data (11 and 5) are pointed to outside the box. I am thinking it is because it is a null value, but what is the reason if so?</p>