R
Q. What is the output of Java program with Right Shift Operator (>>)?
Code:
byte b = 0b00000101;
System.out.print(b + ",");
b = (byte)(b >> 1);
System.out.print(b);
System.out.print(b + ",");
b = (byte)(b >> 1);
System.out.print(b);
- Correct Answer - Option(C)
- Views: 166
- Filed under category JAVA
Discusssion
Login to discuss.