aspose file tools*
The moose likes Java in General and the fly likes Class.forName Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Class.forName" Watch "Class.forName" New topic
Author

Class.forName

Deena Raj
Greenhorn

Joined: Mar 01, 2007
Posts: 7
What is the difference between Class.forName and creating an object using new Abc()
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18904
    
    8

Class.forName() loads a class. The "new" operator creates an instance of a class.
Srikanth Ramu
Ranch Hand

Joined: Feb 20, 2007
Posts: 76
Class.forName() returns the "Class" object associated with ABC() and not a new instance of ABC().

For more details refer:

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class.forName