Home » JAVA Programming » Basic Operators » Question
  1. What is the output of this program?

    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);
    }
    }
    1. 250 2
    2. 260 2
    3. 260 4
    4. 230 6
    5. 210 4
Correct Option: C

output: 260 4



Your comments will be displayed only after manual approval.