Bitwise operators work on the individual bits of integer values. You won't use them daily, but they appear in performance-sensitive code and certain interview problems.
The main bitwise operators are:
&(AND) sets a bit to only if both corresponding bits are|(OR) sets a bit to if either bit is^(XOR) sets a bit to if the bits are different~(NOT) flips every bit
System.out.println(5 & 3); // 1 (0101 & 0011 = 0001)
System.out.println(5 | 3); // 7 (0101 | 0011 = 0111)
System.out.println(5 ^ 3); // 6 (0101 ^ 0011 = 0110)
Java also has shift operators: << shifts bits left (multiplies by ), >> shifts bits right (divides by ). These are faster than multiplication but harder to read, so use them only when performance matters.