Scope of names in Java
<p>A friend told me that this a good example for learning Java scopes, but I don't understand it. </p>

<p>What is <code>a</code>? I am completely lost!</p>

<pre><code>public class scopesexample {

    public static a a = new a&lt;a&gt;(a(new a()));

    public static class a&lt;a&gt; {
        a a;

        public a() {
            this.a = a(a(null));
        }

        public a(a a) {
            this.a = a;
        }

        public a a(a a) {
            return a;
        }

        public String toString() {
            return "a";
        }
    }

    public static a a(a a) {
        return new a&lt;a&gt;(a);
    }

    public static void main(String[] args) {
        System.out.println( a );
        System.out.println( a( a ) );
        System.out.println( a.a );
        a&lt;a&gt; a = new a&lt;a&gt;(a(new a()));
        System.out.println(a.a( a ));
        System.out.println( a );
        System.out.println( a );
        System.out.println(a.class);
        System.out.println(a.getClass());
        System.out.println(a.a);
        System.out.println(a( a ));
        System.out.println(a( a ).a);
    }
}
</code></pre>
