逛奔的蜗牛

我不聪明,但我会很努力

   ::  :: 新随笔 ::  ::  :: 管理 ::

public class Test {

    public static void main(String[] args) throws ParseException {

        SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日");

        GregorianCalendar calendar = new GregorianCalendar();

        calendar.setTime(format.parse("2010年12月25日"));

        calendar.add(Calendar.DAY_OF_YEAR, 1);


        Date date = calendar.getTime();

        System.out.println(date);

    }

}

posted on 2010-12-26 03:31 逛奔的蜗牛 阅读(754) 评论(0)  编辑 收藏 引用 所属分类: Java

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理