how can I call a true or false value created with my "public boolean equals method" in a later method "public static void main(String[] args)"?
public Car(String color, double insurance)
{
this.color = color;
this.insurance = insurance;
}
public boolean equals(Car other)
{
if (this.color.equals(other.color) && this.insurance.equals(other.insurance))
{
return true;
}
else
{
return false;
}
}
I get error: cannot invoke equals(double) on the primitive type double