public class MainClass { public static void main(String[] argv) { double d = Math.sqrt(-1.0); // i.e. Double.NaN int x = (int) d; System.out.println("Value = " + x); System.out.println(); } }
Value = 0