Re: Disadvantages of "instanceof"

From: Dotty (Dotty_at_nospam.invalid)
Date: 02/16/05


Date: Tue, 15 Feb 2005 19:00:56 -0600


"Mark Sizzler" <marksiz@email.org> wrote in message
news:cuu5c6$n7j$03$1@news.t-online.com...
> As far as I know one should not use the operator "instanceof" if possible.
>
> Why?
>
> Mark
>

Who told you "should not use?"
It can only be used with array and object types and values,
not primitive types and values. Other than this, I think it is fine.
HTH
Dotty



Relevant Pages

  • Re: Declaring variables dynamically
    ... That is, class names (object types) ... > saved in the array. ... public class ReflectionSample ... catch (ClassNotFoundException cex) ...
    (comp.lang.java.programmer)
  • Can a Component written in VBScript return an array of Objects?
    ... Can a Component written in VBScript return an array of different Object types? ... 100% Accurate Display Screen OCR ...
    (microsoft.public.scripting.vbscript)
  • Re: newbie JDBC SP exec
    ... The #foreach loop in velocity can iterate through the following java ... Object types: Vector, Hashtable or an Array. ... For you to display a key,value pair in your web page, the best thing is ...
    (comp.lang.java.databases)
  • Declaring variables dynamically
    ... I am new Java programmer and I am trying to declare objects ... class names (object types) are saved in memory ... saved in the array. ...
    (comp.lang.java.programmer)
  • Re: Question about Kernel-Objects
    ... AFAIR NtQueryObject can return array of all object types, in order their ids are. ... Google for details ...
    (microsoft.public.win32.programmer.kernel)