Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes What is the difference between isInstance() and newInstance() ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "What is the difference between isInstance() and newInstance() ?" Watch "What is the difference between isInstance() and newInstance() ?" New topic
Author

What is the difference between isInstance() and newInstance() ?

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
What is the basic diff bet them
Sridhar Santhanakrishnan
Ranch Hand

Joined: Mar 20, 2007
Posts: 317
From the java docs,


isInstance(Object obj)
Determines if the specified Object is assignment-compatible with the object represented by this Class.



newInstance()
Creates a new instance of the class represented by this Class object.


Is there anything specific that you didnt understand?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Prabhat Ranjan wrote:What is the basic diff bet them

Please UseRealWords.


[My Blog]
All roads lead to JavaRanch
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Christophe Verré wrote:
Prabhat Ranjan wrote:What is the basic diff bet them

Please UseRealWords.


mean "What is the difference between them"
 
jQuery in Action, 2nd edition
 
subject: What is the difference between isInstance() and newInstance() ?