Hello,
'b' is of type Long while 'bt' is a Byte object. equals() returns false if the object types are different.
So, because b and bt have different types, b.equals(bt) will always return false.
Yes, the wrapper classes override the equals() method, but according to javadoc of equals() in wrapper class Long: "Compares this object to the specified object. The result is true if and only if the argument is not null and is a Long object that contains the same long value as this object".
Regards,
Shawnne