class NiMingNeiBuLei {
public static void main(String[] args) {
System.out.println("Hello World!");
Book book = new EnglishBook();
book.print();
}
}
interface Book {
public abstract void print();
}
class EnglishBook implements Book{
public void print(){
System.out.println("英语书");
}
} |