Q. What is the output of the Java Program?
Code:
byte num = (byte)0b000_1000;
if(num >> 1 > 6 || true)
{
System.out.print(num);
}
else
{
System.out.println(num>>1);
}
β
Correct Answer: (A)
8