What is the use of Class.forName

Answer Posted / n.sriram

class.forName() is used to load the class at runTime. when
we could not decide which class to load.The Method just
loads the class into memory and when required we can
instantiated the class using Class.forName.newInstance()

Is This Answer Correct ?    15 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is clustering? What are the different algorithms used for clustering?

586


Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

556


What are externizable interface?

592


What are the benefits of detached objects?

593


How to implement dphibernate to activate lazy loading in Flex with java ?thanx in advance!

2562






What is the highest-level event class of the event-delegation model?

582


Brief description about local interfaces?

632


What is colon_pkg_prefixes and what is its use?

2004


What is local interface. How values will be passed?

563


Whats new with the stop(), suspend() and resume() methods in jdk 1.2?

592


Describe, in general, how java's garbage collector works?

544


How is a java object message delivered to a non-java client?

583


Can I import same package/class twice? Will the jvm load the package twice at runtime?

651


How would you detect a keypress in a jcombobox?

682


what are the activation groupworks?

1683