When will we use class loader?
Answers were Sorted based on User's Feedback
Answer / ravikiran(aptech mumbai)
classloader is a part of jvm which will load the compiled
class into the jvm
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / 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 |
What is use of map in java?
what are the difference between Java and .Net?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
What is a list in java?
How do you add an element to a set in java?
What is externalizable interface?
What is java thread dump, how can we get java thread dump of a program?
When is the finally clause of a try-catch-finally statement executed?
What is a local, member and a class variable?
What is arrays aslist in java?
What are the differences between abstract class and interface?
What is difference overloading and overriding?