Java Reference
In-Depth Information
s for a String
v for an arbitrary value of some type
Local variable or parameter names that consist of only two or three lowercase letters
should not conflict with the initial country codes and domain names that are the first
component of unique package names.
6.2. Names and Identifiers
A name is used to refer to an entity declared in a program.
There are two forms of names: simple names and qualified names.
A simple name is a single identifier.
A qualified name consists of a name, a “ . ” token, and an identifier.
In determining the meaning of a name (§ 6.5 ) , the context in which the name appears is
taken into account. The rules of § 6.5 distinguish among contexts where a name must denote
(refer to) a package (§ 6.5.3 ), a type (§ 6.5.5 ), a variable or value in an expression (§ 6.5.6 ) ,
or a method (§ 6.5.7 ) .
Packages and reference types have members which may be accessed by qualified
names. As background for the discussion of qualified names and the determination of
the meaning of names, see the descriptions of membership in § 4.4 , § 4.5.2 , § 4.8 , § 4.9 ,
§ 7.1 , § 8.2 , § 9.2 , and § 10.7 .
Not all identifiers in a program are a part of a name. Identifiers are also used in the follow-
ing situations:
• In declarations (§ 6.1 ), where an identifier may occur to specify the name by which
the declared entity will be known.
• As labels in labeled statements (§ 14.7 ) and in break and continue statements (§ 14.15 ,
§ 14.16 ) that refer to statement labels.
• In field access expressions (§ 15.11 ) , where an identifier occurs after a “ . ” token to
indicate a member of an object that is the value of an expression or the keyword su-
per that appears before the “ . ” token
• In some method invocation expressions (§ 15.12 ), where an identifier may occur
after a “ . ” token and before a “ ( ” token to indicate a method to be invoked for an
object that is the value of an expression or the keyword super that appears before
the “ . ” token
Search WWH ::




Custom Search