6.1. Declarations

A declaration introduces an entity into a program and includes an identifier (§3.8) that can be used in a name to refer to this entity. A declared entity is one of the following:

• A package, declared in a package declaration (§7.4)

• 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), interface (§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 ...

Get The Java® Language Specification, Java SE 7 Edition, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.