This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Difference between new and Class.newInstance()  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Difference between new and Class.newInstance()  " Watch "Difference between new and Class.newInstance()  " New topic
Author

Difference between new and Class.newInstance()

Rahul mir
Ranch Hand

Joined: Oct 31, 2012
Posts: 38

Hi,
please someone explain about newInstance() method.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

here you go .

Plus, I think newInstance create an object with default constructor. if there is no default constructor it throws error.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between new and Class.newInstance()