public class Date{
private int day,month,year,daysInMouth;
Date(int i,int j,int k){
day=i;
month=j;
year=k;
}
Date(){
day=1;
month=1;
year=2014;
}
Date (Date d){
day=d.day;
month=d.month;
year=d.year;
}
public Date tomorrow(){
Date d=new Date(this);
d.day++;
if(d.day>d.daysInMonth())
{//daysInMonth()返回每个月中不同的天数
d.day=1;
d.month++;
if(d.month>12)
d.month=1;
d.year++;
}
}
return d;
}
private int day,month,year,daysInMouth;
Date(int i,int j,int k){
day=i;
month=j;
year=k;
}
Date(){
day=1;
month=1;
year=2014;
}
Date (Date d){
day=d.day;
month=d.month;
year=d.year;
}
public Date tomorrow(){
Date d=new Date(this);
d.day++;
if(d.day>d.daysInMonth())
{//daysInMonth()返回每个月中不同的天数
d.day=1;
d.month++;
if(d.month>12)
d.month=1;
d.year++;
}
}
return d;
}