What is meant by class loader and how many types are there?

Answers were Sorted based on User's Feedback

What is meant by class loader and how many types are there?..

Answer / bhaskar verma

Class loader is a ways to load in the class in the
memory.The class loader is of two type.
1)static Loading.
2)Dyamic Loading.

Dynamic way is done by the help of class.forName();
Static loading is done by 4 ways.
1)In command prompt when u type "java <filename>.The class
is loaded.
2)When new keyword is use.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.

Is This Answer Correct ?    17 Yes 6 No

What is meant by class loader and how many types are there?..

Answer / lucky

Class Loader: Class loder is mainly responsible for loading java class into JVM.

There are 3 types of java class loaders:

1)Bootstrap class loader :loads jdk jars.
2)Extensions class loader : loads java classes from the path
3)System class loader : loads the java classes from system class path , class path has been set by the CLASSPATH environment variable.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

what Data encapsulation in java?

5 Answers  

Is JRE required to compile Java files ?

4 Answers   HCL,

What is the immediate parent class of the Applet class?

1 Answers  

What will be the output of the program? public class Test { public static void main(String args[]) { ArrayList<String> list = new ArrayList<String>(); list.add("2"); list.add("3"); list.add("4"); list.add("5"); System.out.println("size :"+list.size()); for(int i=0;i<list.size();i++) { list.remove(i); } System.out.println("size after:"+list.size()); } }

5 Answers   Rolta,

what is template design pattern?

0 Answers  

what is the difference between a java object reference and c++ pointer?

4 Answers  

Tell me how many ways are there to initialise an integer with a constant.

0 Answers   Aricent,

Why only one Class is public in one file? Explain in details. Thanks in Advance.

12 Answers  

What is the argument type of main() method?

2 Answers  

What is multi-catch block in java?

0 Answers  

explain how many oops concepts available in java with realtime scenarios?

1 Answers   TCS,

What are thread priorities and importance of thread priorities in java?

0 Answers