File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes instanceof and isInstance Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "instanceof and isInstance" Watch "instanceof and isInstance" New topic
Author

instanceof and isInstance

Krishna Latha Grandhi
Ranch Hand

Joined: Nov 08, 2005
Posts: 110
What is the difference between instanceof and isInstance
whether isInstance() belongs to 1.4 or not?
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
What is the difference between instanceof and isInstance


instanceof is used to check to see if an object can be cast into a specified type without throwing a cast class exception.

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


whether isInstance() belongs to 1.4 or not?


Hope 1.4(not sure)
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

isInstance() has been part of the Class class since JDK 1.1


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: instanceof and isInstance
 
Similar Threads
Instance Of
Instance of "Object" class
instanceof
isInstance
instanceof Operator