Menu
Question Index
...

What will be the value of b at the end of the program?

class IntegerConversion
{

    public static void main(String args[])
    {
        int i = 50000;
        byte b = i;
    }
}


b will be 50000.
b will be between -32787 and 32786.
b will be between -128 to 127.
Program does not compile.

Doubts

Problems

Topic: Type Conversion 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