Java Reference
In-Depth Information
If two or more (distinct) interface modifiers appear in an interface declaration, then
it is customary, though not required, that they appear in the order consistent with that
shown above in the production for
InterfaceModifier
.
9.1.1.1. abstract Interfaces
Every interface is implicitly
abstract
.
This modifier is obsolete and should not be used in new programs.
9.1.1.2. strictfp Interfaces
The effect of the
strictfp
modifier is to make all
float
or
double
expressions within the interface
This implies that all nested types declared in the interface are implicitly
strictfp
.
9.1.2. Generic Interfaces and Type Parameters
These type variables are known as the
type parameters
of the interface. The type parameter
section follows the interface name and is delimited by angle brackets.
In an interface's type parameter section, a type variable
T directly depends
on a type vari-
able
S
if
S
is the bound of
T
, while
T depends
on
S
if either
T
directly depends on
S
or
T
directly depends on a type variable
U
that depends on
S
(using this definition recursively).
It is a compile-time error if a type variable in a interface's type parameter section depends
on itself.
The scope of an interface's type parameter is specified in §
6.3
.
It is a compile-time error to refer to a type parameter of an interface
I
anywhere in the de-
claration of a field or type member of
I
.
possible invocation of the type parameter section by type arguments. All of these paramet-
erized types share the same interface at run time.
9.1.3. Superinterfaces and Subinterfaces
If an
extends
clause is provided, then the interface being declared extends each of the other
named interfaces and therefore inherits the member types, methods, and constants of each
of the other named interfaces.