打字猴:1.70045809e+09
1700458090 HumanFactory femaleHumanFactory=new FemaleFactory();
1700458091
1700458092 //生产线建立完毕,开始生产人了:
1700458093
1700458094 Human maleYellowHuman=maleHumanFactory.createYellowHuman();
1700458095
1700458096 Human femaleYellowHuman=femaleHumanFactory.createYellowHuman();
1700458097
1700458098 System.out.println(”–生产一个黄色女性–”);
1700458099
1700458100 femaleYellowHuman.getColor();
1700458101
1700458102 femaleYellowHuman.talk();
1700458103
1700458104 femaleYellowHuman.getSex();
1700458105
1700458106 System.out.println(”\n–生产一个黄色男性–”);
1700458107
1700458108 maleYellowHuman.getColor();
1700458109
1700458110 maleYellowHuman.talk();
1700458111
1700458112 maleYellowHuman.getSex();
1700458113
1700458114 /*
1700458115
1700458116 *……
1700458117
1700458118 *后面继续创建
1700458119
1700458120 */
1700458121
1700458122 }
1700458123
1700458124 }
1700458125
1700458126 运行结果如下所示:
1700458127
1700458128 –生产一个黄色女性–
1700458129
1700458130 黄色人种的皮肤颜色是黄色的!
1700458131
1700458132 黄色人种会说话,一般说的都是双字节。
1700458133
1700458134 黄人女性
1700458135
1700458136 –生产一个黄色男性–
1700458137
1700458138 黄色人种的皮肤颜色是黄色的!
1700458139
[ 上一页 ]  [ :1.70045809e+09 ]  [ 下一页 ]