All objects are direct or indirect subclasses of the super class "Object". It defines an "equals"-method. This method compares the callee object with a parameter object. If they are regarded as equal, then it returns true, else false. This check can be sufficient for a programmer. However, the return value does not say anything about the differences. It only says that at least one difference was detected at all.
Whenever programmers want to know more, they have to examine the objects on their own. Then they write those individually for every object again and again. They wished objects to have a "diff(...)"-method that delivers information about differences. They might call it after "equals()" if they are optimistic or instead of "equals()" if they are pessimistic.
Optimistic and pessimistic refers their expectation of differences here. An optimistic programmer might expect two objects to be equal. A pessimistic tester might assume differences in opposite.
JDiffUtils compares two items and finds the differences if they exist.
Items can be
Explanation of "equals()":
Reference implementation of "equals()":