![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
设计模式
xifeng91
这个作者很懒,什么都没留下…
展开
-
单例模式
[code="java"]package org.jzkangta.singleton; class Single{ private Single(){} private static final Single s1=new Single(); public static Single getSingleInstance(){ return s1; } pub...原创 2009-05-29 11:32:45 · 69 阅读 · 0 评论 -
简单工厂
[code="java"]package org.jzkangta.factorydemo01; interface Car{ public void run(); public void stop(); } class Benz implements Car{ public void run(){ System.out.println("Benz开始启动了。。。。...原创 2009-05-29 11:43:48 · 83 阅读 · 0 评论