This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Difference between new and Class.newInstance()