πŸ“Š JAVA
Q. What is the output of a Java Program with Shift Right Fill Zeroes (>>>) operator?
Code:
byte num = (byte)0b1111_1000;
System.out.print(num + ",");
num = (byte)(num >>> 1);
System.out.print(num);
  • (A) -8, 8
  • (B) -8, 4
  • (C) -8, -4
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) -8, -4

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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