-3

I want to know that the XOR operator in java can add or subtract two operand ?

Shuvo3664
  • 791
  • 2
  • 8
  • 11

1 Answers1

0

XOR Operator in Java and almost in any languages is ^.

Example:

(decimal)    (binary)
     5     =  101
     6     =  110
------------------ xor
     3     =  011

Reference: https://stackoverflow.com/a/2672217/5119030

Mikheil Zhghenti
  • 734
  • 8
  • 28