r/javahelp • • Mar 13 '20

Solved What do ~ and ^ mean in Java?

I can't find it on the internet, what does it mean?

Edit: thanks everyone!

25 Upvotes

8 comments sorted by

View all comments

26

u/[deleted] Mar 13 '20

~ is bitwise complement/negation and ^ is bitwise XOR.

0

u/[deleted] Mar 13 '20

[deleted]

11

u/desrtfx Out of Coffee error - System halted Mar 13 '20

Removed as wrong and misleading.