The values of zerosMatcherNext.group(1)
and zerosMatcher.group(1)
are being evaluated as String with value 0
but the comparison zerosMatcherNext.group(1) == zerosMatcher.group(1)
returns false
. What is the explanation for such a strange behavior?
UPDATE:
but zerosMatcherNext.group(1).equals(zerosMatcher.group(1))
returns true