Q. What will be the output?
Code:System.out.println(1 << 2);
β
Correct Answer: (B)
4
Explanation: Left shift multiplies by 2^n, so 1<<2 = 4.
System.out.println(1 << 2);