Menu
Question Index
...

What will be the output of the following program?

public class DemoOnbyte
{
    public static void main(String[] args)
    {
        byte a = -0x15;
        byte c = (a >> 4);
        System.out.print(c);
    }
}


-2
2
0
1
Compilation Error or Runtime Error

Doubts

Problems

Topic: Type Casting In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App