KnowledgeBoat Logo
|

Computer Applications

Which of the following package is needed to find the square root of a number?

  1. java.text
  2. java.math
  3. java.lang
  4. None

Java Intro

20 Likes

Answer

java.lang

Reason — Math class inside java.lang package contains mathematical functions. The official documentation is provided here. It should not be confused with java.math package which contains BigDecimal, BigInteger and MathContext classes.

Answered By

14 Likes


Related Questions