Java Identifiers : identifier « Java Source And Data Type « SCJP






Identifiers must start with a letter, a currency character ($), or a connecting charactersuch as the underscore _. 
Identifiers cannot start with a number.
After the first character, identifiers can contain any combination of letters, currency characters, connecting characters, or numbers.
There is no limit to the number of characters an identifier can contain.
You can't use a Java keyword as an identifier. 
Identifiers in Java are case-sensitive; foo and FOO are two different identifiers.
A legal identifier for a variable is also a legal identifier for a method or a class.








1.6.identifier
1.6.1.Java Identifiers
1.6.2.Java names always considers case.
1.6.3.legal identifiers:
1.6.4.Java Keywords and Reserved Words
1.6.5.An identifier is a word used by a programmer to name a variable, method, class, or label.
1.6.6.Keywords and reserved words may not be used as identifiers.
1.6.7.An identifier must begin with a letter, a dollar sign ($), or an underscore (_)
1.6.8.Identifier's Subsequent characters may be letters, dollar signs, underscores, or digits.
1.6.9.The only nonalphabetic characters allowed to start a name are $ and _(underscore).
1.6.10.Embedded keywords are ok
1.6.11.Illegal identifier: starts with a digit
1.6.12.Illegal Identifier: bad 1st char
1.6.13.The following are invalid Java identifiers:
1.6.14.A simple identifier followed by an expression