Vidyalelo
Java Programming · Q50

Operators

Programming · Java Programming · question 50

Q50

What will be the output of the following Java program? class leftshift_operator public static void main(String args[]) byte x = 64; int i; byte y; i = x << 2; y = (byte) (x << 2) System.out.print(i + " " + y);

A.
0 64
B.
64 0
C.
0 256
D.
256 0
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board