Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Core Java - Interview Questions and Answers for 'Class loaders' - 5 question(s) found - Order By Newest | ||||
Advanced level question. Recently asked in few Indian service companies ( Based on 3 inputs ) | ||||
| ||||
Ans. Bootstrap - Loads JDK internal classes, java.* packages. Extensions - Loads jar files from JDK extensions directory - usually lib/ext directory of the JRE System - Loads classes from system classpath. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   jvm   memory management   class loaders   bootstrap   extensions   system  classloaders   advanced   technical lead   technical architect Asked in 7 Companies | ||||
| ||||
Ans. Part of JVM which is used to load classes and interfaces. Bootstrap , Extension and System are the class loaders used by JVM. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   class loaders  classloaders   jvm   java memory management   advanced Asked in 3 Companies | ||||
| ||||
Ans. Class loaders are hierarchical. The very first class is specially loaded with the help of static main() method declared in your class. All the subsequently loaded classes are loaded by the classes, which are already loaded and running. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   jvm   memory management   class loaders  classloaders Asked in 1 Companies | ||||
| ||||
Ans. static loading - Classes are statically loaded with Java new operator. dynamic class loading - Dynamic loading is a technique for programmatically invoking the functions of a class loader at run time. Class.forName (Test className); | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   jvm   memory management   class loaders  classloaders   static class loading   static loading   dynamic class loading   dynamic loading Asked in 2 Companies expert   frequent | ||||
| ||||
Ans. loadClass only loads the class but doesn't initialize the object whereas Class.forName initialize the object after loading it. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   class loaders   jvm   advanced | ||||