Kotlinlearncs.online LogoJava
Return to List

Homework: Restaurant Hash Code

Created By: Geoffrey Challen
/ Version: 2021.11.0

Create a public class named Restaurant providing a single primary constructor setting three private String properties: id, name, and cuisine, in that order. Implement hashCode using java.util.Objects by hashing the restaurant's id and name, only, in that order.

Related Lessons

Stuck? You may find these lessons helpful: