why a object's method could demand a class but not a object?

Discussion in 'Java' started by mike, Jan 21, 2005.

  1. mike

    mike Guest

    regards:


    why a object's method could demand a class but not a object?
    ...@@


    Node [] images = parser.extractAllNodesThatAre(ImageTag.class);
    ^^^^^^^^^^^^^^^^^^

    thank you
    may god be with you
     
    mike, Jan 21, 2005
    #1
    1. Advertising

  2. (mike) writes:

    > Node [] images = parser.extractAllNodesThatAre(ImageTag.class);
    > ^^^^^^^^^^^^^^^^^^


    That's not a class name, but a reference to the _object_ (an instance
    of java.lang.Class) that represents (is "metaclass" of) the class
    ImageTag.
     
    Tor Iver Wilhelmsen, Jan 21, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Adam Knight
    Replies:
    1
    Views:
    1,136
    Ken Cox - Microsoft MVP
    Dec 5, 2005
  2. fortepianissimo

    Computing class variable on demand?

    fortepianissimo, Feb 3, 2005, in forum: Python
    Replies:
    7
    Views:
    295
    Steven Bethard
    Feb 5, 2005
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,072
    Smokey Grindel
    Dec 2, 2006
  4. Elf M. Sternberg
    Replies:
    15
    Views:
    277
    Matthias Reitinger
    Jul 29, 2009
  5. Replies:
    0
    Views:
    100
Loading...

Share This Page