Java nested classes- under the hood?
<p>I have a couple of questions relating to nested classes within Java.</p>

<ul>
<li><p>How do nested classes appear "under the hood", with regards to memory allocations?</p></li>
<li><p>You cannot declare a static variable within a nested class (I think the exact error was that static attributes can only be declared at the top level class). Why is this and what other restrictions are there for nested classes?</p></li>
</ul>

<p>If possible, please say whether your answer is Java-specific, or whether C++ also follows the same rules?</p>
