Java / Object, Class and Package
How does Java ClassLoader Work?
When JVM requests a Java class, it invokes loadClass method of the ClassLoader by passing the fully classified name of the Class. loadClass method calls findLoadedClass() method to check that the class has been already loaded or not.
If the Class is not already loaded then it will delegate the request to parent ClassLoader to load the class.
If the parent ClassLoader does not find the Class then it will invoke findClass() method to look for the class in the file system.
More Related questions...