What function does the ^ (caret) operator serve in Java?
^
When I try this:
int a = 5^n;
...it gives me:
It's bitwise XOR, Java does not have an exponentiation operator, you would have to use Math.pow() instead.
Math.pow()