Do static variables consume memory?? Since static blocks/variables are executed/loaded only at the first time the class is loaded, wiil they be loaded for the entire JVM lifetime or they will be accessed on the fly?? Thanx in advance.
Charles Rector
Greenhorn
Joined: Feb 18, 2003
Posts: 14
posted
0
They are loaded on demand (when their containing class is used in some way), and then persist for the duration of the application.