A class loader, when invoked to load a class, might delegate the loading process to another class loader, i.e., there may be a chain of delegation. In such a case the _rst class loader is called an initiating loader. The loader which eventually loads the class and incorporates the class into the environment is called a de_ning loader. Two classes are equal i_ they have the same name, where the loader part of the name refers to the de_ning loader. It is possible that two classes, loaded by di_erent initiating loaders, are de_ned by the same loader. This is the reason why we have to attach the de_ning loader to the class name instead of the initiating loader.
If a class C references other classes, the de_ning loader of class C is used to load the references if they are not already loaded by that loader. For example, if C is de_ned by loader L and the super class of C is Object, then the loader L is used to load class Object. The loader L can load the class directly (becoming the de_ning loader) or it may delegate the loading to another loader. The JVM environment provides a system class loader which loads classes from the local _le system.
Since the system loader does not delegate loading, all references of a class loaded by the system loader are also loaded by the system loader. Therefore, local classes, which are typically built-in classes, cannot reference non-local classes. This avoids the problem of type spoo_ng" local classes.
JVM Related Interview Questions
|Java Script Interview Questions||Adv Java Interview Questions|
|Core Java Interview Questions||AJAX Interview Questions|
|Android Interview Questions||Java applet Interview Questions|
|Java 8 Interview Questions||JBOSS Interview Questions|
|Advanced jQuery Interview Questions||Apache Tomcat Interview Questions|
|Application Virtualization Interview Questions||Java 9 Interview Questions|
The Imperative Core Javai Of Java
The Procedural Extension Javac Of Javai
The Object-oriented Extension Javao Of Javac
The Exception-handling Extension Javae Of Javao
The Concurrent Extension Javat Of Javae
Java Is Type Safe
The Jvmi Submachine
The Procedural Extension Jvmc Of Jvmi
The Object-oriented Extension Jvmo Of Jvmc
The Exception-handling Extension Jvme Of Jvmo
Correctness Of The Compiler
The Defensive Virtual Machine
Bytecode Type Assignments
The Diligent Virtual Machine
The Dynamic Virtual Machine
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.