### Example 3: Bitwise Operations

```
public class BitwiseExample {
public static void main(String[] args) {
int p = 5;
int q = 3;
// Bitwise operators
int andResult = p & q; // Result: 1
int orResult = p | q; // Result: 7
int xorResult = p ^ q; // Result: 6
int notResult = ~p; // Result: -6
int leftShiftResult = p << 2; // Result: 20
int rightShiftResult = 16 >> 2; // Result: 4
int unsignedRightShiftResult = -16 >>> 2; // Result: 1073741820
}
}
```

Operators and expressions are the backbone of Java programming, enabling developers to perform a wide array of computations and comparisons. This comprehensive exploration covered arithmetic, relational, logical, assignment, and bitwise operators, providing a solid foundation for utilizing these tools effectively. By mastering operators and expressions, developers can write concise, efficient, and expressive Java code, unlocking the full potential of the language for various applications. Whether you’re a beginner or an experienced programmer, a deep understanding of these concepts is crucial for building robust and scalable Java applications.