Q. What will be the output?
Code:
System.out.println(10 >> 1);
β
Correct Answer: (A)
5
Explanation: Right shift divides by 2, so 10>>1 = 5.
System.out.println(10 >> 1);
Explanation: Right shift divides by 2, so 10>>1 = 5.