Practice: Object v. Reference Equality

I have two questions🥹

  1. The system says:

“Your submission contains unexecuted code:
You have 1 more lines of unexecuted code than the solution, which is more than the limit of 0.”

but I campared my code with the walkthrough and they look the same. I can’t figure out what‘s wrong.

  1. How can we be sure the input object o1 and o2 have overrided .equals() methos? if o1 and o2 happen to not override .equals() method, won’t .equals() in line 7 just work as ==? I can’t find another way around .equals() though, I’m not sure why .equals() works.

In case you haven’t figured it out:

  1. You don’t need the else block. So instead of
    else { return -1 } you could simply write return -1

  2. Could you provide me with the question description?