File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes difference between creating instance of a class and using class.forname() Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "difference between creating instance of a class and using class.forname()" Watch "difference between creating instance of a class and using class.forname()" New topic
Author

difference between creating instance of a class and using class.forname()

Pavan Rao
Greenhorn

Joined: Apr 11, 2008
Posts: 9
can anyone tell difference between creating instance of a class and using class.forname()
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 434

Hi,

Class.forName() will get you a Class object and not an instance of the class as is the case using the new operator.

Cheers,
Raj.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32694
    
    4
"sdg amlock" please read the important administrative private message I have just sent you.

CR
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: difference between creating instance of a class and using class.forname()
 
Similar Threads
different ways of instantiating
Difference between object and instance
java
Class.forName()
Class.forName