java-工厂模式
摘要:
1,简单工厂package com.yangwei.shop.dao;public class DaoFactory { public static IAddressDao getAddressDao(){ return new AddressDao(); } public static IUserDao getUserDao(){ return new UserDao(); }}public class TestAddress { private static IAddressDao addressDao=DaoFactory.get... 阅读全文
posted @ 2013-09-13 18:38 梦相随1006 阅读(244) 评论(0) 推荐(0) 编辑