I have two "equal" Strings. When I print both Strings they look exactly the same in the screen. But when I compare the Strings the result is "false" and using .length in both Strings the result is 174 for the first String and 171 for the second. I have deleted all whitespaces and everything to set the Strings in one line.
String 1:
<docxmlns="http://example.com/default"xmlns:x="http://example.com/x"><aa1="1"a2="2">123</a><bxmlns:y="http://example.com/y"a3=""3""y:a1="1"y:a2="2">cdf</b></doc>
String 2:
<docxmlns="http://example.com/default"xmlns:x="http://example.com/x"><aa1="1"a2="2">123</a><bxmlns:y="http://example.com/y"a3=""3""y:a1="1"y:a2="2">cdf</b></doc>
String 1 length: 174
String 2 length: 171
I copied both Strings from Netbeans console, as you can see they are equals but they have different lengths.
Thanks.