Articles

What is classloader?

What is classloader?

What is classloader?

After a java code is written and compiled it gets saved as .class file. Now if that class needs to be used again then it needs to be loaded into the memory.

 

The java classloader loads the class into memory.

Java has three types of built-in classloader:

  1. System classloader→This is used to load class from current classpath and can be set when a program is invoked using -cp or -classpath from the command line. 
  2. Bootstrap classloader→This is used to load JDK internal classes like java.lang.* package classes, etc. 
  3. Extensions classloader→This is used to load classes from JDK external directory. For example, $JAVA_HOME/lib/ext directory

Learn more interview questions here...


Java Interview Questions

Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com

About the Author
Rohanjit Kumar
Technology geek, loves to write and share knowledge with the world. Having 9+ years of IT experience. B.Tech in Computer Science & Engineering
Page Views :    Published Date : Jun 28,2020  
Please Share this page

Related Articles

Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!