This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi I had a doubt about the instantiation of inner class� From what I know instantiation of an inner class requires an object of outer class, except when the inner class is instantiated within the outer class itself.
In an interface, a nested class definition is implicitly static. (See JLS 9.5.) Therefore, although it is a "nested" class, it is not an "inner" class. (See JLS 8, JLS 8.1.3, and JLS 8.5.2.)
Because it is static, a static nested class can be instantiated without any enclosing instance. This makes it possible to instantiate from a static context, like main, where there is no implicit "this" referencing the current instance.
(Edit: Added JLS references.) [ November 01, 2008: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org