Java Reference
In-Depth Information
• An imported type, declared in a single-type-import declaration (§ 7.5.1 ) or a type-
import-on-demand declaration (§ 7.5.2 )
• A class, declared in a class type declaration (§ 8.1 )
• An interface, declared in an interface type declaration (§ 9.1 )
• A type variable (§ 4.4 ), declared as a type parameter of a generic class (§ 8.1.2 ) , in-
terface (§ 9.1.2 ), method (§ 8.4.4 ), or constructor (§ 8.8.1 ).
• A member of a reference type (§ 8.2 , § 9.2 , § 10.7 ) , one of the following:
♦ A member class (§ 8.5 , § 9.5 )
♦ A member interface (§ 8.5 , § 9.5 )
♦ An enum constant (§ 8.9 )
♦ A field, one of the following:
A field declared in a class type (§ 8.3 )
A field declared in an interface type (§ 9.3 )
The field length , which is implicitly a member of every array type (§ 10.7 )
♦ A method, one of the following:
A method ( abstract or otherwise) declared in a class type (§ 8.4 )
A method (always abstract ) declared in an interface type (§ 9.4 )
• A parameter, one of the following:
♦ A parameter of a method or constructor of a class (§ 8.4.1 , § 8.8.1 )
♦ A parameter of an abstract method of an interface (§ 9.4 )
♦ A parameter of an exception handler declared in a catch clause of a try state-
ment (§ 14.20 )
• A local variable, one of the following:
♦ A local variable declared in a block (§ 14.4 )
♦ A local variable declared in a for statement (§ 14.14 )
Constructors (§ 8.8 ) are also introduced by declarations, but use the name of the class in
which they are declared rather than introducing a new name.
The class libraries of the Java SE platform attempt to use, whenever possible, names
chosen according to the conventions presented below. These conventions help to
make code more readable and avoid certain kinds of name conflicts.
Search WWH ::




Custom Search