i'm newbie in Java ...i create this Class to calculate age from java.util.Date but compiler gave me error "cannot find symbol" for LocalDate instance variable ...may any one explain why and correct it ? [can not find symbol][1]
this is the code:
import java.util.Date;
public class TimeAndAge extends CheckDate
{
private LocalDate birthDate;
private LocalDate now;
private LocalDate age;
public TimeAndAge (int theYear,int theMonth,int
theDay,LocalDatebirthdate,LocalDate now,Years age)
{
super(theYear,theMonth,theDay);
this.birthDate = birthDate;
this.now = now;
this.age=age;
}
public void setBirthDate(LocalDate birthdate)
{
birthdate = new
LocalDate(super.getYear(),super.getMonth(),super.getDay());
}
public LocalDate getBirthDate()
{
return birthDate;
}
public void setNow(LocalDate now)
{
now = new LocalDate();
}
public LocalDate getNow()
{
return now;
}
public void setAge(Years age)
{
age = Years.yearsBetween(birthdate, now);
}
public Years getAge()
{
return age;
}
}