Java access misunderstanding
<p>Why does the following code compile fine?</p>

<pre><code>public class MyStack {

    private static MyStack myStack ;
    private Stack&lt;MyObject&gt; stackOfMyObjects;

    private MyStack() {
        stackOfMyObjects = new Stack&lt;MyObject&gt;() ;
    }

    public static void pushToStack(MyObject myObject, MyStack myStack2) {
        myStack2.stackOfMyObjects.push(myObject) ;
    }

}
</code></pre>

<p>Here, in the <strong>pushToStack</strong> method, how can the <strong>stackOfMyObjects</strong> member of <strong>myStack2</strong>, event though <strong>stackOfMyObjects</strong> has been defined private?</p>
