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. Advertisements

  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. Advertisements

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. Roxanne
    Replies:
    0
    Views:
    1,464
    Roxanne
    Jul 4, 2003
  2. Adam Knight
    Replies:
    1
    Views:
    1,364
    Ken Cox - Microsoft MVP
    Dec 5, 2005
  3. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    1,370
    Mark Rae
    Dec 21, 2006
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,838
    Smokey Grindel
    Dec 2, 2006
  5. Replies:
    3
    Views:
    1,109
    Roedy Green
    Jan 28, 2008
  6. Elf M. Sternberg
    Replies:
    15
    Views:
    504
    Matthias Reitinger
    Jul 29, 2009
  7. aidy
    Replies:
    5
    Views:
    489
    Marcin Mielżyński
    Jun 4, 2006
  8. Iñaki Baz Castillo
    Replies:
    13
    Views:
    773
    Iñaki Baz Castillo
    May 1, 2011
Loading...