testing out the ^(EOR/XOR) in java compare to C++