热门标签
更多>
搜索结果
查询Tags标签: polymorphic,共有 2条记录-
java:Method Factory(Polymorphic Facotry Pattern/Virtual Constructor Pattern)
/** 版权所有 2022 涂聚文有限公司* 许可信息查看:* 描述:* 工厂方法模式 Method Factory(Polymorphic Facotry Pattern/Virtual Constructor Pattern)* 历史版本: JDK 14.02* 2022-09-12 创建者 geovindu* 2022-09-12 添加 Lambda* 2022-09-12 修改:date* 接口类* 2…
2022/9/13 14:19:00 人评论 次浏览 -
Java 多态 polymorphic 枚举 练习
package ersatz;public class Car {private double temperature;public Car(double temperature) {this.temperature = temperature;}private class Air {public void tune() {if (temperature >= 40) {System.out.println("cold air");} else if (temperatu…
2021/7/9 17:12:44 人评论 次浏览