A
Q. What is the output of this program?
Code:
public class LeftShift_Operator
{
public static void main(String args[])
{
byte A = 65;
int i;
byte b;
i = A << 2;
b = (byte) (A << 2);
System.out.print(i + " " + b);
}
}
{
public static void main(String args[])
{
byte A = 65;
int i;
byte b;
i = A << 2;
b = (byte) (A << 2);
System.out.print(i + " " + b);
}
}
- Correct Answer - Option(C)
- Views: 4
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.