What does the ^ operator do in Java?
Posted
by joroj
on Stack Overflow
See other posts from Stack Overflow
or by joroj
Published on 2010-01-02T11:44:47Z
Indexed on
2010/04/21
9:43 UTC
Read the original article
Hit count: 248
What function does the "^" operator serve in Java?
When I try this:
int a = 5^n;
...it gives me:
for n = 5, returns 0
for n = 4, returns 1
for n = 6, returns 3
...so I guess it doesn't indicate exponentiation. But what is it then?
© Stack Overflow or respective owner