What does $ mean in Java?-VBForums
Results 1 to 2 of 2

Thread: What does $ mean in Java?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    152

    What does $ mean in Java?

    This may sound dumb, but what does $ mean in Java? I have searched and searched for an answer but can't come up with anything.

    What is the difference between this.myProperty and this.$.myProperty?

    What would be the significance the following line?
    private MyScript$Type(String name) {

    What about in a class name? : MyScript$Type.class

  2. #2
    Frenzied Member kfcSmitty's Avatar
    Join Date
    May 2005
    Location
    Kingston, Ontario
    Posts
    1,964

    Re: What does $ mean in Java?

    I've never seen it before, but this document seems to have some information on it.

    Quote from the article above:

    Names of nested classes are transformed as necessary by the compiler to avoid conflicts with identical names in other scopes. Names are encoded to the virtual machine by taking their source form, qualified with dots, and changing each dot `.' after a class name into a dollar sign `$'. (Mechanical translators are allowed to use dollar signs in Java.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.