equals and hashCode
I wonder if my equals and hashCode are ok?
thanks for any comment/improvment
publicboolean equals(Object o)
{
if (this == o)
{
returntrue;
}
if (o ==null || getClass() != o.getClass())
{
returnfalse;
}
Car car = (Car) o;
Identification identification = car.getIdentification();
if (identification.getCarNumber()==this.identification.getCarNumber())
returntrue;
returnfalse;
}
publicint hashCode()
{
return (int) identification.getCarNumber();
}

