beyondgrader.com Logo
DemoBrowseAboutTeamLogin

Object v. Reference Equality

Geoffrey Challen // 2020.10.0

Implement a public class method named compare on a public class Comparison that accepts two Object arguments. It should return 0 if both references are equal, 1 if both objects are equal, and -1 otherwise. Either reference can be null, so you'll need to handle those cases carefully!