I've not done Java in a couple of years and I've been doing C# during
that time, so I know I mixing my languages a bit. What I cannot
remember how to do in Java is test an object for its type. In C# one
uses the "isa" keyboard, but I can't find something like this in Java.
Perhaps because I am having to use 1.2? The only thing I can think of
is to compare the objectInstance.class.getName() and
comparingObject.class.getName(). This doesn't work for inheritance very
well. Any pointers would be greatly appreciated.
Janwillem Borleffs - 04 Sep 2005 15:12 GMT
> I've not done Java in a couple of years and I've been doing C# during
> that time, so I know I mixing my languages a bit. What I cannot
[quoted text clipped - 4 lines]
> comparingObject.class.getName(). This doesn't work for inheritance
> very well. Any pointers would be greatly appreciated.
Use the "instanceof" keyword.
JW
No One - 04 Sep 2005 19:00 GMT
>>I've not done Java in a couple of years and I've been doing C# during
>>that time, so I know I mixing my languages a bit. What I cannot
[quoted text clipped - 8 lines]
>
> JW
Thanks. I knew I was having a brain cramp.