Q. What is the output of the Java code snippet?

Code:
byte a = 0b0000_0001;
System.out.println(~a);
  • (A) -1
  • (B) -2
  • (C) 254 D
  • (D) +127
πŸ’¬ Discuss
βœ… Correct Answer: (B) -2

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
229
Total Visits
πŸ“½οΈ
5 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
93%
Success Rate