Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (7k points)
I used ^ operator to get the exponent of a number but I am getting the wrong answer. What exactly does the ^ operator do in Java?

1 Answer

0 votes
by (13.1k points)

^ is a bitwise XOR operator in Java. The ^ operator copies a bit if it is present in one operand but not in both. For example, applying ^ between 55 and 90 would return 109.

Related questions

0 votes
1 answer
asked Feb 17, 2021 in Java by Harsh (1.5k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...