// set date of birth
public void setDOB(int day, int month, int year)
{
this.day = day;
this.month = month;
this.year = year;
}
// get date of birth
public int getDOB()
{
return day;
return month;
return year;
}
Why do I get an error when I try to return these three values? I thought I was able to do something like this in order to save some space by not writing each set/get method for day, month, and year.
Also, I only seem to get an error with return month;
, meaning it's the only one that eclipse has highlighted to tell me to delete it.