上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页

2015年11月9日

策略模式

摘要: 策略模式定义了一系列的算法,并将每一个算法封装起来,而且使它们还可以相互替换。策略模式让算法独立于使用它的客户而独立变化。—抽象策略角色: 策略类,通常由一个接口或者抽象类实现。—具体策略角色:包装了相关的算法和行为。—环境角色:持有一个策略类的引用,最终给客户端调用。 阅读全文

posted @ 2015-11-09 13:12 kebizhanmushi 阅读(110) 评论(0) 推荐(0)

简单工厂模式

摘要: 阅读全文

posted @ 2015-11-09 08:52 kebizhanmushi 阅读(118) 评论(0) 推荐(0)

2015年11月8日

面向对象的原则

摘要: 接口负责公共方法的声明,抽象类负责公共方法的实现 阅读全文

posted @ 2015-11-08 20:57 kebizhanmushi 阅读(108) 评论(0) 推荐(0)

2015年11月7日

Hibernate

摘要: 1,全查String hql="from StudInfo"; Query q=ss.createQuery(hql);public static void main(String[] args) { // 1.获取Session Session ss=HibernateSessionFact... 阅读全文

posted @ 2015-11-07 20:47 kebizhanmushi 阅读(144) 评论(0) 推荐(0)

2015年11月6日

什么叫反射工厂

摘要: 要创建一个实例,只需传一个实例名就可以了,大大的减少了代码,提高了效率java.util.Properties是对properties这类配置文件的映射一、项目中经常会需要读取配置文件(properties文件),因此读取方法总结如下:1、通过java.util.Properties读取Java代码... 阅读全文

posted @ 2015-11-06 22:35 kebizhanmushi 阅读(163) 评论(0) 推荐(0)

package com.haha.单例;

摘要: package com.haha.单例;//懒汉public class Dog { private static Dog dog=new Dog(); public static Dog NEW(){ return dog; } public static Dog sound(){ ... 阅读全文

posted @ 2015-11-06 19:57 kebizhanmushi 阅读(108) 评论(0) 推荐(0)

2015年11月5日

冒泡法排序

摘要: 先用第一个和后面的每一个比,再用第二个和他后面的每一个比前冒法:package com.haha.test2;public class Test2 { /** * @param args */ public static void main(String[] args) { int[] dat... 阅读全文

posted @ 2015-11-05 15:17 kebizhanmushi 阅读(138) 评论(0) 推荐(0)

2015年11月4日

监听器

摘要: 1,2,public class MyListener implements ServletContextListener { public void contextDestroyed(ServletContextEvent arg0) { System.out.println("---销毁---... 阅读全文

posted @ 2015-11-04 22:36 kebizhanmushi 阅读(115) 评论(0) 推荐(0)

过滤器

摘要: public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) throws IOException, ServletException { //进入服务器之前 System.out.prin... 阅读全文

posted @ 2015-11-04 22:18 kebizhanmushi 阅读(113) 评论(0) 推荐(0)

ServletRequest,HttpServletRequest ServletResponse,HttpServletResponse

摘要: 1.HttpServletResponse对象(1).Web服务器收到一个http请求,会针对每个请求创建一个HttpServletRequest和HttpServletResponse对象,向客户端发送数据找HttpServletResponse,从客户端取数据找HttpServletReques... 阅读全文

posted @ 2015-11-04 21:43 kebizhanmushi 阅读(121) 评论(0) 推荐(0)

上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页

导航