How to get the type of the class for comparison

Posted by Halo on Stack Overflow See other posts from Stack Overflow or by Halo
Published on 2010-03-11T19:27:29Z Indexed on 2010/03/11 19:29 UTC
Read the original article Hit count: 188

Filed under:
|
|

I have this object which is an instance of a superclass. I want to know which subclass that object really is, so that I can decide what to do with it. There is this getClass() method but it's apparently not used for comparison issues. How can I get the sub-type of my object?

© Stack Overflow or respective owner

Related posts about java

Related posts about superclass