日期:2014-05-16  浏览次数:20974 次

Chapter 1: Declarations and Access Control ---

Legal Identifiers

■ Identifiers must start with a letter, a currency character ($), or a connecting

character such as the underscore ( _ ). Identifiers cannot start with a number!

■ After the first character, identifiers can contain a

ny combination of letters,

currency characters, connecting characters, or numbers.

■ In practice, there is no limit to the number of characters an identifier can

contain.

■ You can't use a Java keyword as an identifier. Table 1-1 lists all of the Java

keywords including one new one for 5.0, enum.

■ Identifiers in Java are case-sensitive; foo and FOO are two different identifiers.

?

Complete List of Java Keywords (assert added in 1.4, enum added in 1.5)

?

?