Computer Science, asked by haz269522, 6 hours ago

Name the type of error for the following expression: double x=-12.0,y=0.0;y=math.sqrt(x)

Answers

Answered by princessfuzzle
0

Answer:

If the value of x is negative, Math.sqrt() returns NaN.

Because sqrt() is a static method of Math, you always use it as Math.sqrt(), rather than as a method of a Math object you created (Math is not a constructor

Similar questions