假如我們 Target 接口中有 hello() 和 word() 兩個(gè)方法。
Target
hello()
word()
public interface Target { ? ?void hello(); ? ?void world();}
可由于接口版本迭代 接口的 方法可能會(huì)被廢棄掉或不被支持,Adaptee 類的 greet()方法將代替 方法。
Adaptee
greet()