Kotlinlearncs.online LogoJava
Return to List

Solve: Car Equality

Created By: Geoffrey Challen
/ Version: 2021.2.0

Define a class named Car. The Car constructor should accept a String make, String model, and Int mileage, in that order. Override equals and consider two Car instances to be equal if they have the same make and model. Do not expose your Car fields publicly.

Related Lessons

Stuck? You may find these lessons helpful: