posted 17 years ago
First, I think it's worth pointing out that "top level nested" is an old term for static nested. The idea was that if a nested class definition is static, then it's not tied to an instance of the enclosing class, and can therefore be treated as a "top level" class.
But as the JLS now states, "A nested class is any class whose declaration occurs within the body of another class or interface. A top level class is a class that is not a nested class." And "an inner class is a nested class that is not explicitly or implicitly declared static."
So...
since the top level nested interfaces are implicitly static then will the members of the interface are also static?
Interface fields are implicitly static. But interface methods are implicitly abstract, so they cannot be static. This is true whether the interface is nested or not.
Can a toplevel nested class can have a non-static member?
Certainly. As demonstrated below, making the nested class static does not make the members of that class static.
"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