Interface Declarations
An interface declaration
specifies a new named reference type. There are two
kinds of interface declarations
1)normal interface declarations
2)annotation type declarations:
InterfaceDeclaration:
NormalInterfaceDeclaration
AnnotationTypeDeclaration
Annotation types are described further in .
NormalInterfaceDeclaration:
InterfaceModifiersopt interface Identifier TypeParametersopt
ExtendsInterfacesopt InterfaceBody
The identifiers
in an interface declaration specifies the name of the interface. A
compile-time error occurs if an interface has the same simple name as any of its
enclosing classes or interfaces.
An interface declaration
kinds of interface declarations
1)normal interface declarations
2)annotation type declarations:
InterfaceDeclaration:
NormalInterfaceDeclaration
AnnotationTypeDeclaration
Annotation types are described further in .
NormalInterfaceDeclaration:
InterfaceModifiersopt interface Identifier TypeParametersopt
ExtendsInterfacesopt InterfaceBody
The identifiers
compile-time error occurs if an interface has the same simple name as any of its
enclosing classes or interfaces.
0 comments:
Post a Comment