πŸ“Š JAVA
Q. What is the output of the Java program with Left Shift Operator (<<)?
Code:
byte b = 0b00000101;
System.out.print(b + ",");
b = (byte)(b << 1);
System.out.print(b);
  • (A) 5,2
  • (B) 5,5
  • (C) 5,10
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) 5,10

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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