JLS 2 Chapter 8 :
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.
Inner classes specification :
http://java.sun.com/products/jdk/1.1/docs/guide/innerclasses/spec/innerclasses.doc1.html In addition, the programmer can define a class as a static member of any top-level class. Classes which are static class members and classes which are package members are both called top-level classes
SO,
package com.deepak;
class Outer {
static class IsThisTopLevel { }
}
Is the class 'IsThisTopLevel' a top level class (as per the Inner class specs) or just a nested class (as per JLS2)