When will we use class loader?

Answer Posted / aks

In a Java Virtual Machine (JVM), each and every class is
loaded by some instance of a java.lang.ClassLoader. The
ClassLoader class is located in the java.lang package and
you can extend it to add your own functionality to class
loading.

Since Java 1.2 we have three types of class loaders:
Class loaders created automatically by the JVM
Program defined class loaders
Context class loaders.

There are three Class loaders in first group:
bootstrap class loader - loads classes
from ../jre/lib/rt.jar It is the "root" in the class loader
hierarchy.
extensions class loader - loads classes
from ../jre/lib/ext/*.jar
system class loader - it is responsible for loading in the
application, as well as for loading classes and resources
in the application's CLASSPATH.

Second group includes:
system class loader - parent class loader by default
additional parent class loader can be specified explicitly

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is public static void main?

565


What about abstract classes in java?

608


What is the difference between menuitem and checkboxmenu item?

771


Justify your answer that you can't define a method inside another method in java, if you can then how?

600


How to check if linked list contains loop in java?

457






How to instantiate static nested classes in java?

562


What does you mean in math?

535


Name few java util classes introduced with java 8 ?

499


How do you reverse a list?

550


What is the generic class?

529


Is arraylist ordered in java?

570


What is thread safe singleton?

511


How do you use wildcards?

528


How are variables stored?

531


What is the properties class in java programming?

540