随笔分类 -  设计模式

摘要:1.普通工厂模式package CommonFactory;public class Test { public static void main(String[] args) { VehicleFactory factory = new CarFactory(); ... 阅读全文
posted @ 2014-04-27 17:31 Shanks-香克斯 阅读(178) 评论(0) 推荐(0)
摘要:1.单例设计模式1.1不考虑多线程public class Singleton { private static Singleton instance; private Singleton (){} public static Singleton getInstance() { ... 阅读全文
posted @ 2014-04-26 23:10 Shanks-香克斯 阅读(523) 评论(0) 推荐(0)