Menu
Question Index
...

What will be the output of the following program?

public class BooleanValue {
    public static void main(String args[]) {
        Float big = new Float(12.50);
        Float sml = new Float("12.50");
        boolean flag = false;
        if (!big.equals(sml)) {
            System.out.print(flag);
        } else
            System.out.print(!flag);
    }
}


false
true
Compilation Error
Runtime Error

Doubts

Problems

Topic: Java Boolean Class

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App