10.12.2012 Views

The Java Language Specification, Third Edition

The Java Language Specification, Third Edition

The Java Language Specification, Third Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.3 Reference Types and Values TYPES, VALUES, AND VARIABLES<br />

44<br />

4.3 Reference Types and Values<br />

<strong>The</strong>re are three kinds of reference types: class types (§8), interface types (§9), and<br />

array types (§10). Reference types may be parameterized (§4.5) with type arguments<br />

(§4.4).<br />

ReferenceType:<br />

ClassOrInterfaceType<br />

TypeVariable<br />

ArrayType<br />

ClassOrInterfaceType:<br />

ClassType<br />

InterfaceType<br />

ClassType:<br />

TypeDeclSpecifier TypeArgumentsopt InterfaceType:<br />

TypeDeclSpecifier TypeArgumentsopt TypeDeclSpecifier:<br />

TypeName<br />

ClassOrInterfaceType . Identifier<br />

TypeName:<br />

Identifier<br />

TypeName . Identifier<br />

TypeVariable:<br />

Identifier<br />

ArrayType:<br />

Type [ ]<br />

DRAFT<br />

A class or interface type consists of a type declaration specifier, optionally followed<br />

by type arguments (in which case it is a parameterized type). Type arguments<br />

are described in (§4.5.1).<br />

A type declaration specifier may be either a type name (§6.5.5), or a class or<br />

interface type followed by "." and an identifier. In the latter case, the specifier has<br />

the form T.id, where id must be the simple name of an accessible (§6.6) member<br />

type ( §8.5, §9.5) of T, or a compile-time error occurs. <strong>The</strong> specifier denotes<br />

that member type.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!