Identity –> a variable holds the SAME instance as another variable.
Equality -> two (distinct) objects can be used interchangeably. they often have the same id.
Integer a = new Integer(1); Integer b = new Integer(1); a is equal but not identical to b.
Integer x = new Integer(1); Integer y = x; x is identical to y.
of course, two identical objects are always equal.