illustration of java interfaces
Illustration 4.1
interface Resume {
��.
void bioData ( ) ; // By default it is an abstract method.
���� // when it is declared in an interface
}
class Teacher extends Employee implements Resume {
. . . . // Assume Employee is a class defined some where
Qualification ; // A member element
��..
experience ( ) {���} // A member function
���.
public void bioData ( ) {
// Code for this method for preparing the bio-data of a teacher //
}
}
class Student implements Resume {
��.
Discipline; // A member element.
���.
result ( ) { ��.} // A member function
��..
public void bioData ( ) {
// Code for the method for preparing the bio-data of a student //
}
}