1. interface Coxwold{
2. public void amethod();
3. }
4. public class Easingwold implements Coxwold{
5. public static void main(String argv[]){
6. Coxwold c = new Easingwold();
7. c.amethod();
8. }
9. public void amethod(){
10. System.out.println("amethod");
11.}
12.}
( 6 )will be checked at the compile time for.. whether Easingwold IS-A Coxwold
( 7 )compilation fails if Coxwold does not know about the method..means the method is not declared in the interface.
Both of the condition does passes hence will print
amethod. [ November 06, 2006: Message edited by: Sanjeev Kumar Singh ]