Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {

    public static void main(String[] args) {
        double d = Math.sqrt(-10);
        boolean b1 = Double.isNaN(d);

        System.out.println(b1);

        Double dObj = new Double(d);
        boolean b2 = dObj.isNaN();
        System.out.println(b2);

    }

}