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

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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