NAMES
Meaning of Expression Names
6.5.5
In this example:
The name
wnj.test
 must name a package on the host system. It is resolved
by first looking for the package
wnj
, using the procedure described in
 6.5.3.1, and then making sure that the subpackage
test
 of this package is
accessible.
The name
java.util.Date
 ( 21.3) must denote a type, so we first use the
procedure recursively to determine if
java.util
 is an accessible package,
which it is, and then look to see if the type
Date
 is accessible in this package.
6.5.5   Meaning of Expression Names
The meaning of a name classified as an
ExpressionName
 is determined as follows.
6.5.5.1
Simple Expression Names
If an expression name consists of a single
Identifier
, then:
If the
Identifier
 appears within the scope ( 6.3) of a local variable declaration
( 14.3) or parameter declaration ( 8.4.1,  8.6.1,  14.18) with that name, then
the expression name denotes a variable, that is, that local variable or parame 
ter. Local variables and parameters are never hidden ( 6.3,  6.3.1,  14.3), so
there is necessarily at most one such local variable or parameter. The type of
the expression name is the declared type of the local variable or parameter.
Otherwise, if the
Identifier
 appears within a class declaration ( 8):
N
If there is not exactly one member of that class ( 8.2) that is a field with that
name, then a compile time error results.
N
Otherwise, if the single member field with that name is declared
final
( 8.3.1.2), then the expression name denotes the value of the field. The type
of the expression name is the declared type of the field. If the
Identifier
appears in a context that requires a variable and not a value, then a compile 
time error occurs.
N
Otherwise, the expression name denotes a variable, the single member field
with that name. The type of the expression name is the field's declared type.
If the field is an instance variable ( 8.3.1.1), the expression name must appear
within the declaration of an instance method ( 8.4), constructor ( 8.6), or
instance variable initializer ( 8.3.2.2). If it appears within a
static
 method
( 8.4.3.2), static initializer ( 8.5), or initializer for a
static
 variable
( 8.3.1.1,  12.4.2), then a compile time error occurs.
95






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved