dcsimg
instanceof vs. getClass
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, June 11, 2001 06:01 PM

At the level of the VM, what are diferences beetween

instanceof and getClass()?

Re: instanceof vs. getClass

Posted By:   Sandip_Chitale  
Posted On:   Monday, June 11, 2001 09:16 PM

getClass() simply returns the 'Class' of the object on which it is called.


The instanceof is a boolean operator. It checks if the object in question is an instance of the Type, or subclass of the Type or implements the Type interface. Thus it does much more than getClass().

About | Sitemap | Contact