Puzzle on Inner Classes and Class Hiding
<p>I have a very interesting Example to solve which is based on inner classes:</p>

<pre><code>package inner;

class A{
    void m(){
        System.out.println("Outer");
    }
}

public class TestInner {
    public static void main(String[] args) {
        new TestInner().go();       
    }

    private void go() {
        new A().m();
        class A{
            void m(){
                System.out.println("Inner");
            }
        }
        new A().m();
    }
    class A{
            void m(){
            System.out.println("Middle");
        }
    }


}
</code></pre>

<hr>

<p>The OUTPUT it gives is:
Middle 
Inner</p>

<p>but my question is **how can i print the output as:
Outer
Inner</p>

<p><em>Condition is I dont want to use the package name to create an object....</em></p>

<p>A good response is expected...</p>

<p>Thanks.enter code here</p>
