O
OldPro
Why is this giving an error? birthDate is properly initialized, isn't
it?
public abstract class Employee
{
private String firstName;
private String lastName;
private String socialSecurityNumber;
private Date birthDate;
// three-argument constructor
public Employee( String first, String last, String ssn, String
birth )
{
firstName = first;
lastName = last;
socialSecurityNumber = ssn;
birthDate = new Date(); // Here is where the error occurs (it
doesn't stop the program)
birthDate.setDate(birth);
} // end three-argument Employee constructor
it?
public abstract class Employee
{
private String firstName;
private String lastName;
private String socialSecurityNumber;
private Date birthDate;
// three-argument constructor
public Employee( String first, String last, String ssn, String
birth )
{
firstName = first;
lastName = last;
socialSecurityNumber = ssn;
birthDate = new Date(); // Here is where the error occurs (it
doesn't stop the program)
birthDate.setDate(birth);
} // end three-argument Employee constructor