instanceof Operator
Ramesh Mandaleeka
ramesh.mandaleeka at gmail.com
Fri Apr 9 09:45:35 PDT 2010
Thank you Jonathan. But the method you are referring is in java.lang.Class
class not java.lang.Object. Isn't it nice to have final public boolean
isInstanceOf(Object obj) as a method in java.lang.Object class?
Note: Hope this is right forum to ask. If not please let me know I will
cross post on the appropriate forum.
Thanks,
Ramesh
On Fri, Apr 9, 2010 at 11:54 AM, Jonathan Gibbons <
jonathan.gibbons at oracle.com> wrote:
> Ramesh Mandaleeka wrote:
>
>> Hi,
>>
>> Why there is not instanceOf() method in java.lang.Object just like
>> equals()
>> method. Why we need an operator? A class can tell if it equals to other
>> object or not but why not an instanceOf(Object obj) method ( I guess it
>> should be final too).
>>
>> Regards,
>> Ramesh
>>
>>
>>
> If this message was not off-topic for the list, I would reply that it's
> there and called isAssignableFrom.
>
> -- Jon
>
More information about the coin-dev
mailing list