black and white laptop on table back to back
Photo by Jeroen den Otter on Unsplash

In real-world applications, you may need to compare two custom objects that you have defined.

Maybe you need to compare them based on certain criteria, or their certain attributes.

Let’s say you have a class called Game and you want to be able to compare games based on their scores.

Continue reading