But what you posted IS an example...
What exactly don't you understand - which part?
Does this part make sense:
The equals() method in class Object uses only the == operator for comparisons
You HAVE to understand that first, and understand the difference between the == operator and the equals() method.
So let's start there. If that much makes sense, we can discuss more. Otherwise, we need to stay here until that is clear.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors