import java.util.*;
import java.text.DateFormat;
public class GetDate
{
public static void main(String args[]) throws Exception
{
String date="2001/11/30";
DateFormat dateFormat =
DateFormat.getDateInstance(DateFormat.MEDIUM);
GregorianCalendar grc=new GregorianCalendar();
grc.setTime(new Date(date));
grc.add(GregorianCalendar.Date,2);
System.out.println("grc="+dateFormat.format(grc.getTime()));
}
}
import java.text.DateFormat;
public class GetDate
{
public static void main(String args[]) throws Exception
{
String date="2001/11/30";
DateFormat dateFormat =
DateFormat.getDateInstance(DateFormat.MEDIUM);
GregorianCalendar grc=new GregorianCalendar();
grc.setTime(new Date(date));
grc.add(GregorianCalendar.Date,2);
System.out.println("grc="+dateFormat.format(grc.getTime()));
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货