Hi All,
I'm new to this site and
Java and apologise if this isn't the correct forum to post this.
In the article "Getting in Touch with your Inner Class ", I refer to a line of code that the author says can be used to "instantiate both the outer class and inner class at the same time":
Inner i = new Outer().new Inner();
My question is :
Does this really work ? I've tried this and get a compile error:
TestMe.java:33: Class Inner not found in type declaration.
Inner i = new Outer().new Inner();
^
1 error
Is this related to the version of Java I'm using ?
Thanks in advance.
Ravi..