Normally in dealing with primitive type byte we test equality by using == operators. This will no longer true if we are dealing with Byte wrapper class because inherently to test two object equality we have to use the equals() method, which is by default being inherited by all java objects from class Object.
Byte b1 = 12;
Byte b2 = 12;
Normally if the above code declaration uses byte primitive type, the result would be true however since the byte value 12 is assigned to wrapper class Byte, it would print out false. If we wanted to use the == operator instead of equals, then we need to convert the Byte values using the byteValue() method of Float class so as to convert the wrapper classes to primitive values
b1.byteValue() == b2.byteValue()
The above code snippet would result to true.