Monday 16 March 2015

Q 17 ) What Happens At Class Loading Time ?




Step 1 : Byte code of the class will be placed in the main memory.
Step 2 : Default Constructor will be created.
Step 3 : Stack will be constructed for the class.
Step 4 : Memory will be allocated for the static variables.
Step 5 : A static block is executed.

( Static block will be executed first during the class loading time) 

No comments:

Post a Comment