posted 16 years ago
See the class name you provided during saving your code must contain the main() method.
JVM needs to be told where is the main() located.
When it locates the main() it loads the class and also the super class in the memory.
During this, as we know, the static variables and methods belongs to the class and not to any instance, the static block it executed and only one copy of it is maintained in the memory.
The cal to new Hawk() makes a new object in the JVM, in which the new keyword is responsible for the call to the constructor of the class.
So first the class is loaded along with it superclass in the memory.
It is after this you can do new Hawk().
Hope this helps.
[ December 10, 2008: Message edited by: Sudipto Shekhar ]