标签:inter nts pre div compute put rgs str sharp
1.桥接模式:可以使得两个不同接口的实现的不同组合
2.实例
public interface Brand {
}
public class Huasuo implements  Brand{
	
}
public interface  Computer {
}
public class Desktop  implements Computer{
   private Brand  brand;
  public Desktop(Brand brand) {
	super();
	this.brand = brand;
  }
  
}
public class Client {
   public static void main(String[] args) {
	 Desktop desktop = new Desktop(new Huasuo());
  }
}
标签:inter nts pre div compute put rgs str sharp
原文地址:https://www.cnblogs.com/gg128/p/9570160.html