- 博客(3)
- 收藏
- 关注
转载 schedule和scheduleAtFixedRate区别
schedule和scheduleAtFixedRate的区别在于,如果指定开始执行的时间在当前系统运行时间之前,scheduleAtFixedRate会把已经过去的时间也作为周期执行,而schedule不会把过去的时间算上。 比如 SimpleDateFormat fTime = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date d
2014-08-15 10:06:24
240
转载 springmvc获取HttpServletRequest对象
spring mvc在普通类中获取HttpServletRequest对象需要做2个步骤: 1、在web.xml文件中加如下配置 org.springframework.web.context.request.RequestContextListener 在RequestContextListener类中有如下代码,其中红色标注的为关键代码: p
2014-08-07 14:00:07
326
转载 String,StringBuffer与StringBuilder的区别??
String 字符串常量 StringBuffer 字符串变量(线程安全) StringBuilder 字符串变量(非线程安全) 简要的说, String 类型和 StringBuffer 类型的主要性能区别其实在于 String 是不可变的对象, 因此在每次对 String 类型进行改变的时候其实都等同于生成了一个新的 String 对象,然后将指针指向新的 String 对象,所以经常
2014-08-07 10:00:56
128
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅