1.

What will be the output of the program?

public class SqrtExample { public static void main(String [] args) { double value = -9.0; System.out.println( Math.sqrt(value)); }
}

A. 3.0
B. -3.0
C. NaN
D. Compilation fails.
Answer» D. Compilation fails.


Discussion

No Comment Found

Related MCQs