In Java, static essentially means "associated with the class." For fields, this means there is only one location in memory, allocated when the class is loaded. The single field stays with the class, regardless of how many instances might be created. For methods and nested class definitions, this means that there is no implicit "this" reference to the enclosing instance. For initializers, this means the code is executed when the class is loaded.
So for a top-level (non-nested) class, there is no enclosing class to associate with, and static has no meaning. [ March 29, 2006: Message edited by: marc weber ]
Joined: Feb 03, 2006
Thanks a Lot !!
For the Response
"associated with the class." For fields, this means there is only one location in memory,
i think this is the most suitable answer for my question