package InterfactTest;
public class InterfaceTest { public static void main(String[] args) { // TODO Auto-generated method stub Computer com new Computer(); com.transferData(new Print()); //创建了非匿名实现类的匿名对象 …
package ProxyTest;//接口的应用:代理模式public class NetWorkTest {public static void main(String[] args) {Server se new Server();new ProxyServer(se).browse();}
}interface NetWork{void browse();
}//被代理类
class Server implements NetWork{Overridepublic voi…