Declaring Interfaces
Previous | Home | Next |
Interfaces are declare with the following syntax :-
(visibility) interface InterfaceName (extends other interfaces) {
constant declarations
member type declarations
abstract method declarations
simple interface may be:public interface Animal
{
boolean chasePrey(Prey p);
void eatPrey(Prey p);
}
Previous | Home | Next |