定义 通过工厂对象生成接口的具体实现对象, 这样我们的代码完全与接口的实现解耦; 代码 接口 public interface Cycle { // 骑方法 void cycle(); } 接口实现 /** * 独轮车实现 */ public class Unicycle im