Computer Applications

Give the output of Math.sqrt(x); when x = 9.0.

  1. 3
  2. 3.0
  3. 3.00
  4. All of these

Java Math Lib Methods

1 Like

Answer

3.0

Reason — Math.sqrt() method returns the square root of an argument. Thus, 3.0 is returned by Math.sqrt(9.0).

Answered By

1 Like


Related Questions