1)Without an outer class object existing, there cannot be an inner class object. That is, the inner class object is always associated with the outer class object.
2) Inside normal/regular inner class, static members can’t be declared.
3) As main() method can’t be declared, regular inner class can’t be invoked directly from the command prompt.
4) Both static and non static members of outer class can be accessed directly.
STATIC NESTED CLASS:
1)Without an outer class object existing, there may be a static nested class object. That is, static nested class object is not associated with the outer class object.
2) Inside static nested class, static members can be declared.
3) As main() method can be declared, the static nested class can be invoked directly from the command prompt.
4) Only a static member of outer class can be accessed directly.
INNER CLASS :
1)Without an outer class object existing, there cannot be an inner class object. That is, the inner class object is always associated with the outer class object.
2) Inside normal/regular inner class, static members can’t be declared.
3) As main() method can’t be declared, regular inner class can’t be invoked directly from the command prompt.
4) Both static and non static members of outer class can be accessed directly.
STATIC NESTED CLASS:
1)Without an outer class object existing, there may be a static nested class object. That is, static nested class object is not associated with the outer class object.
2) Inside static nested class, static members can be declared.
3) As main() method can be declared, the static nested class can be invoked directly from the command prompt.
4) Only a static member of outer class can be accessed directly.