What will be the output of the program? public class SqrtExample { public…
PYQ RPSC Programmer 2011
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
- B.
-3
- C.
NaN
- D.
Compilation fails
Attempted by 2 students.
Sign up free to check your answer
Sign up freeLoading lesson…

