Question :What are dynamic class loaders? (CoreJava)
Answer :This is a mechanism of loading classes at runtime. They have following
characteristics,
a. lazyloading - load classes only when they are required. This helps in
memory management.
b. type safety linkate - Dynamic loading of a class should not require
additional run-time checks in order to
guarantee type safety. Adds link-time checks by replacing run-time checks.
They are performed only once.
c. User defined class loaders - Programmers have the control to load
classes in their applications. A user can
define a class loader to load classes from remote location.
d. Multiple namespaces - Class loaders provide separate namespaces for
different software components. For
example an applet running in a browser loads classes from different jar
files. Assume that the classes loaded
from different jar files have same name but they are treated as distinct
types by JVM
E.g.
Class cla = Class.forName( "com.javagalaxy.util.MyClass" );
MyClass tCla = (MyClass)cla.newInstance( );
tCla.doSomething();
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Thursday, March 12, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment