Hi.
It says that the operator and return statement don't work. Can someone please explain what is wrong, and why it's wrong? I don't get it.
package hello;
private class Person
{
private string firstName, lastName;
private Date birthDate;
public Person(String fN, String lN, int month, int day, int year)
{
firstName = fN;
lastName = lN;
birthDate = new Date(month, day, year);
}
public boolean equals(Person theOtherPerson)
{
return firstName.equals(theOtherPerson.firstName) && lastName.equals(theOtherPerson.lastName) && birthDate.equals(theOtherPerson.birthDate);
}
public boolean equal(String fN, String lN, int month, int day, int year)
{
return firstName.equals(fN) && lastName.equals(lN) && birthDate.equals( new Date(month, day, year));
}
public String toString()
{
return firstName + " " lastName + " " + birthDate.toString();
}
};