πŸ“Š JAVA
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);
  • (A) 5,-6
  • (B) 5,10
  • (C) 5, 2
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) 5, 2

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
197
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
89%
Success Rate