> From: "Mike Jackson" <[EMAIL PROTECTED]> > Sent: Thursday, February 20, 2003 11:06 AM > Subject: RE: instance of (ot)
> Perhaps you ought to post a snippet of what doesn't work. I personally > haven't had any problems with "instanceof", but without seeing what you're > doing I don't think any of us can help. The problem is that 'instanceof' does not take an expression on its Right Hand Side, rather it must be a class specifier. So this: Class c = anObject.getClass(); boolean b = anObject instanceof c; does not compile. However, this SHOULD work: Class c = anObject.getClass(); boolean b = c.isInstance(anObject); I think that's what he wants. (I haven't tested this). Regards, Will Hartung ([EMAIL PROTECTED]) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
