首页 | 源码下载 | 网站模板 | 网页特效 | 广告代码 | 网页素材 | 字体下载 | 书库 | 站长工具
会员投稿 投稿指南 RSS订阅
当前位置:主页>网络编程>java教程>资讯:JAVA时间格式化处理的小方法

JAVA时间格式化处理的小方法

www.jz123.cn  2010-02-23   来源:   中国建站    责任编辑(袁袁)    我要投递新闻

  日期格式化

import java.util.Date;
  import java.text.SimpleDateFormat;
  class dayTime
  {
  public static void main(String args[])
  {
  Date nowTime=new Date();
  System.out.println(nowTime);
  SimpleDateFormat time=new SimpleDateFormat("yyyy MM dd HH mm ss");
  System.out.println(time.format(nowTime));
  }
  }


上一篇:JAVA WEB程序中添加定时器的代码介绍 下一篇:Java中的修饰词使用方法总结

评论总数:0 [ 查看全部 ] 网友评论


关于我们隐私版权广告服务友情链接联系我们网站地图