int max = Integer.MAX_VALUE;
System.out.println(max + 1);What is printed?
- A
0
- Bcheck_circle
-2147483648
- C
Integer.MAX_VALUE
- D
2147483648
Explanation
Adding 1 to Integer.MAX_VALUE overflows and wraps around to Integer.MIN_VALUE, which is -2147483648.