Kotlinlearncs.online LogoJava
Return to List

Solve: Song Equality

Created By: Geoffrey Challen
/ Version: 2020.10.0

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

Related Lessons

Stuck? You may find these lessons helpful: