O'Reilly logo

The Java® Language Specification, Java SE 7 Edition, Fourth Edition by Alex Buckley, Gilad Bracha, Guy Steele, Bill Joy, James Gosling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.5. Determining the Meaning of a Name

The meaning of a name depends on the context in which it is used. The determination of the meaning of a name requires three steps:

• First, context causes a name syntactically to fall into one of six categories: PackageName, TypeName, ExpressionName, MethodName, PackageOrTypeName, or AmbiguousName.

• Second, a name that is initially classified by its context as an AmbiguousName or as a PackageOrTypeName is then reclassified to be a PackageName, TypeName, or ExpressionName.

• Third, the resulting category then dictates the final determination of the meaning of the name (or a compile-time error if the name has no meaning).

PackageName:    Identifier    PackageName . IdentifierTypeName:    Identifier    PackageOrTypeName ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required