6.5.2 实现interface
An class implements an interface to have the interface.
实现interface的类,其interface中所有的方法必须被“实现”,否则这个类 成为一个抽象类。.
所有实现interface中的方法必须被申明为
public
.
Case Study:
Store.java
一个类可以实现多个interface -- 这是Java中的"多继承".
Case Study:
Adventure.java
Next Page