hello.
I'm trying to XOR 2 string like this:
char[] str1 = "AAAABBBB";
char[] str2 = "BBBBBBBB";
static public char[] xor ( char[] a, char[] b )
{
int length = Math.min (a.length, b.length );
char[] result = new char[length];
for ( int i=0; i<length ; i++ )
{
result[i] = (char) ( a[i] ^ b[i] );
}
return result;
}
The result would be AAAA, right?
Instead, if i print the operation a[i] ^ b
, i get 33330000, where this values come from, doesn't the xor operation return 1 or 0 ?
Thank you.