ddate=new date()和ddate=new date(iyear,imonth,0)
不同的构造函数,都是构造了一个date实例,就是他们的表现形式不同,你可以打出来看一下。ddate=new date(iyear,imonth,0)这个将日期格式化了。
不同的构造函数,都是构造了一个date实例,就是他们的表现形式不同,你可以打出来看一下。ddate=new date(iyear,imonth,0)这个将日期格式化了。
解决方案 »
- 求助:关于网络爬虫,爬取Google相关页面异常问题?
- jsp往ACCESS数据库中写不进去数据,并且还不提示错误。。。
- jsp报405错误,请各位大虾知道一下
- 李兴华视频的MLDN项目。用SSH整合时出现了问题。
- <%@ page import="java.util.*"%>使用Date对象出错
- struts 2 中的日期校验框架 无效
- ServletContext到底是一个什么样的对象?是句柄么?有什么作用?
- hibernate
- 怎么样修改oracle的字段类型为clob类型,sql应该怎么写啊!
- 在tomcat4 中怎样配置虚拟目录
- java.lang.BigDecimal谁用过他???
- 才华科技
ddate=new date(iyear,imonth,0)//表示获得指定的日期(年,月,日)
* Allocates a <code>Date</code> object and initializes it so that
* it represents the time at which it was allocated, measured to the
* nearest millisecond.
*
* @see java.lang.System#currentTimeMillis()
*/
public Date() {
this(System.currentTimeMillis());
}
/**
* Allocates a <code>Date</code> object and initializes it so that
* it represents midnight, local time, at the beginning of the day
* specified by the <code>year</code>, <code>month</code>, and
* <code>date</code> arguments.
*
* @param year the year minus 1900.
* @param month the month between 0-11.
* @param date the day of the month between 1-31.
* @see java.util.Calendar
* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(year + 1900, month, date)</code>
* or <code>GregorianCalendar(year + 1900, month, date)</code>.
*/
public Date(int year, int month, int date) {
this(year, month, date, 0, 0, 0);
}