What function does the ^ (caret) operator serve in Java?
^
When I try this:
int a = 5^n;
...it gives me:
It is the bitwise xor operator in java which results 1 for different value (ie 1 ^ 0 = 1) and 0 for same value (ie 0 ^ 0 = 0).