Menu
Question Index
...

What will be the output of the following program?

public class One {
    public static void main(String args[]) {
        Integer one = (int) Math.sqrt(25);
        System.out.println(one);
        boolean b1 = isNaN(one);
        System.out.println(b1);
        boolean b = Integer.isNaN(flo);
        System.out.print(b);
    }
    static public boolean isNaN(double k) {
        return (k != k);
    }
}


5
false
false
5
false
true
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Java Math Class - java.lang.Math

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App