Breaking News
Home / Java / Java FAQ / What is Static Classloading in Java?

What is Static Classloading in Java?

Static class loading in Java The JVM creates class loaders that loads the classes as required during program execution. Whenever a class that is declared with the new keyword in the code, that class will be statically loaded by the JVM and is referred to as Static Class Loading. In other words the JVM already knows about that this class has to be loaded as it declared in the code.

 

In this instance the class HelloWorld is declared with a new keyword and will be statically loaded by the JVM. If the JVM cannot find this class definition at Run-time, it will throw a NoClassDefFoundException, indicating that it could not find the class in any of known class-paths.[pb_builder]

Check Also

When is OCAJP Java certification going live?

After completing the BETA phase of testing last year, the Oracle’s new OCAJP Java certification, …

Advertisment ad adsense adlogger