Menu
Question Index
...

What will be the output of the following program?

public class BigDelight {
    public static void main(String[] args) {
        for (byte b = Byte.MIN_VALUE; b < Byte.MAX_VALUE; b++) {
            if (b == 0x90)
                System.out.print("Printing");
            if (b == (byte) 0x90)
                System.out.print("Printing");
            if ((b & 0xff) == 0x90)
                System.out.print("Printing");
        }
    }
}


Printing
PrintingPrinting
PrintingPrintingPrinting
(EMPTY)
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Creating Objects for Primitive Data Types (Byte, Short)

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App