Menu
Question Index
...

What will be the output of the following program?

public class DemoOnFloat
{
    public static void main(String[] args)
    {
        float fl = 5.3f;
        if (fl == 5.3)
            System.out.println("Both are equal");
        else
            System.out.println("Both are not equal");
    }
}


Both are not equal
Both are equal
Compilation Error
Runtime Error

Doubts

Problems

Topic: if Condition 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