This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Do you mean Static Member classes? also known as Top-Level Nested Classes. These classes can be used as any regular Top level classes. They can be instantiated without an outer instance associated with them and can also define both static and non-static members, like any top level package member. However they can also access Static members from the enclosing class. Zulfiqar Raza
A free-standing top level class cannot be static. A static class can exist only within the context of another class. Static InnerClasses are not associated with an instance of outer ( enclosing ) class.
Usually static member classes( aka nested class ) are used as helper classes for the enclosing class. Hope that helps! Ajith
[This message has been edited by Ajith Kallambella (edited November 08, 2000).]
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Subha, I have a doubt regarding your example, Here yu r calling a non static method in the main which is static, Is this valid? I mean by calling it even through object reference i.e o1.nonstaticmethod().......... I cant understand this, can yu explain it more clearly... Hope I dont sound so silly.