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.
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
)
,
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
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.
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