Class loading refers to the operation of the JVM finding the byte code for the class.
Instance Creation is when an instance gets allocated in memory for a class object.
>> Is it possible to have a instance creation at the time
>> of class loading .
Well you normally don't care "when" the class is loaded. When you want an instance you create one. If your asking if you can be notified of the "Class loading" event, i am not aware of any such mechanism. It might be possible to do that if you write your own class loader.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.