Leandro Coutinho wrote:No. This syntax is used to access inner classes that are not visible to the class.
I tried and it works as you says but K&S book on Chapter 8, page 667 says:
1. The code to make an instance from anywhere outside nonstatic code of the outer class
The preceding code is the same regardless of whether the main() method is within MyOuter class or some other class.
On page 668 /next page/ says:
2. From outside the outer class instance code (including static method code within the outer class) , the inner class name must now include the outer class's name: MyOuter.MyInner
I'm confused about this. Could you please clear my doubts?