The convention is that identifiers should begin with a letter (Upper-case for class/interface/enum names, lower-case for everything else) and then contain letters and numbers only. $_ are permitted by the compiler, but should be avoided.
The exceptions are:
Package names may contain underscores _ and may begin with underscore (see this Java™ Tutorials section) and are lower-case throughoutConstant identifiers (public static final) are UPPER_CASE throughout with words separated by underscoresYou will see identifiers beginning with $; those names are added automatically by compilers.