When will a static variable is loaded?is it at compile time or runtime?

Showing Answers 1 - 10 of 10 Answers

Justin

  • Oct 19th, 2005
 

Static variable are loaded when classloader brings the class to the JVM. It is not neccessary that an object has to be created. When u access any of the static variable or static methods then the class will be loaded.

m.suresh kumar reddy

  • Oct 20th, 2005
 

runtime only

  Was this answer useful?  Yes

Baswanth Rao

  • Oct 29th, 2005
 

Static variables are loaded at the beginning of the class loading. Static variables will be allocated memory space when they have been loaded.

  Was this answer useful?  Yes

kotresh munavalli matt

  • Nov 8th, 2005
 

: When will a static variable is loaded?is it at com...

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions