package com.ijunfu.test;
interface A{
void showA();
}
interface B extends A {
void showB();
}
class C {
public void showC(){
System.out.println("c.....");
}
}
abstract class D extends C implements B {
public abstract void showD();
}
public class InterfaceTest {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
D d = new D() {
@Override
public void showA() {
// TODO Auto-generated method stub
System.out.println("A.......");
}
@Override
public void showB() {
// TODO Auto-generated method stub
System.out.println("B.......");
}
@Override
public void showD() {
// TODO Auto-generated method stub
System.out.println("D.......");
}
};
d.showA();
d.showB();
d.showC();
d.showD();
}
}
|