Java class loaders are responsible for loading Java classes in Java Virtual Machine (JVM). There are three system provided class loaders.
1) BootStrap ( Primordial) - loads internal JDK classes (java.*)
2) Extenstion - Loads jar files from JDK extension library
3) System. - classes in system class path ( place where JVM will look for user defined classes and packages)
Classes are loaded when they are needed in general. However there are two different scenarios of class loading
1) Static - when you instantiates your class with a new operator.
2) Dynamic - When you load a class at runtime using
Class.forName(String className)
No comments:
Post a Comment