However, since this is geared toward Java beginners, I'm wondering if in the distributed world, the $ lives on with a special meaning.
The Tutorial's advice to not use '$' in identifiers in human-written code is addressed to everyone.
Indeed, the JLS says roughly the same thing, and that document is most decidedly NOT aimed at beginners:
"The Java letters include uppercase and lowercase ASCII Latin letters A-Z
, and a-z
, and, for historical reasons, the ASCII underscore (_
) and dollar sign ($
). The $
character should be used only in mechanically generated source code or, rarely, to access pre-existing names on legacy systems." - JLS 3.8.
The reason that '$' identifiers are legal but discouraged is to provide compilers and code generators a "private" extension to the normal identifier namespace. When a generator needs to synthesize an identifier, including a '$' in the identifier means that it should not collide with any existing (or future) human-created identifiers.
If '$' was not available, the generator would need to check that each synthesized identifier does not create an identifier collision, or risk generating Java code that does not compile. This is difficult if the generated code includes Java code supplied by the programmer, and potentially impossible if the generated code needs to work with arbitrary classes that are not available to the generator at the time it is run.
I don't know the extent to which '$' is actually used by generators, but I know for a fact that the Java compiler uses them for names of nested and anonymous inner classes, and (I think) related hidden variables. So you should pay attention to this advice.
$
was valid in class files, but not java source. – Zindman