This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Class.forName" Watch "Class.forName" New topic


Deena Raj

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

Joined: Oct 14, 2005
Posts: 19973

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:
I agree. Here's the link:
subject: Class.forName
jQuery in Action, 3rd edition