What is meant by class loader. How many types are there. When will we use them

Showing Answers 1 - 12 of 12 Answers

rsenthil

  • Aug 9th, 2010
 

Class Loader is a part of JVM used to load the classes dynamically. It will load the classes based on demand. Diffrent types of class loaders are extension class loader, system class loader and bootstrap class loader. Bootstrap class loader loads the classes in rt.jar and i18n.jar, extension class loader loads the class in ext dir, system class loader loads all other classes in the class path.

  Was this answer useful?  Yes

Class loader is a ways to load the class in the memory. The class loader is
of two type.
1) Static Loading.
2) Dynamic Loading. Dynamic way is done by the help of class.forName();


Static loading is done by following ways.
1) In command prompt when you type "java. The class is loaded.
2) When new keyword is used. Ex. Hello h=new Hello().
3) When you invoke a static method with the class name.
Ex. Hello.m1().m1() is the static method with null value. 


  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions