A
Q. What is the output of the Java program with Right Shift (Without Fill Zeroes)?
Code:
byte num = (byte)0b1111_1000;
System.out.print(num + ",");
num = (byte)(num >> 1);
System.out.print(num);
System.out.print(num + ",");
num = (byte)(num >> 1);
System.out.print(num);
- Correct Answer - Option(C)
- Views: 15
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.