Results 1 to 2 of 2
  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004

    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
    March 2015 Winner kfcSmitty's Avatar
    Join Date
    May 2005
    Kingston, Ontario

    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


Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.