posted 15 years ago
1)static blocks are executed when class is loaded.
2)unless we create an obj for class 'a', static block of 'a' did not run, so we can conclude that when creating objects, class is loaded.
3)But we did not create any obj for class that contains main(), then how come the static block of the class c2 (class with main()) get executed???
is there anything that i have mentioned wrong... please explain..