Advertisements
Advertisements
Question
Which of the following package is needed to find the square root of a number?
Options
java.text
java.math
java.lang
None
MCQ
Solution
java.lang
Explanation:
The java.lang package includes the Math class, which provides various mathematical functions, including the sqrt() method for calculating the square root of a value.
shaalaa.com
Is there an error in this question or solution?