What does dollar sign in ClassName$.class mean?

Discussion in 'Java' started by Marcus Leon, Jun 7, 2006.

  1. Marcus Leon

    Marcus Leon Guest

    I know that ClassName$InnerClass.class is used for inner classes but
    why does the compiler sometimes create one or more files like
    ClassName$.class or ClassName$1.class?

    Thanks
    Marcus Leon, Jun 7, 2006
    #1
    1. Advertising

  2. "Marcus Leon" <> wrote in message
    news:...
    >I know that ClassName$InnerClass.class is used for inner classes but
    > why does the compiler sometimes create one or more files like
    > ClassName$.class or ClassName$1.class?


    Anonymous inner classes:

    Runnable r = new Runnable () { public void run () { doThat (); } };

    Cheers,
    Matt Humphrey http://www.iviz.com/
    Matt Humphrey, Jun 7, 2006
    #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. Norman Yuan
    Replies:
    0
    Views:
    851
    Norman Yuan
    Dec 8, 2005
  2. Oliver S.

    classname::classname a type ?

    Oliver S., Sep 11, 2003, in forum: C++
    Replies:
    1
    Views:
    494
    White Wolf
    Sep 11, 2003
  3. Hongzheng Wang
    Replies:
    32
    Views:
    859
  4. Mark Hahn
    Replies:
    29
    Views:
    1,017
    Fredrik Lundh
    Apr 21, 2004
  5. Ante Perkovic

    CSS: "tagname.classname" or ".classname"

    Ante Perkovic, Dec 22, 2003, in forum: Javascript
    Replies:
    2
    Views:
    98
Loading...

Share This Page