Following is inValid logic that is why you are seeing equals returning false when both objects ontains "Shiva"
if(sValue.equals(b2)
Here it will always return false unless b2 is a
String Object and contains the same value as sValue has.
if you modify it as
if(sValue.equals(b2.sValue)
equals implementation will be logically correct