KnowledgeBoat Logo
|

Computer Applications

Which of the following does not find the square of a number?

  1. Math.pow(a,2)
  2. a*a
  3. Math.sqrt(a,2)
  4. a**2

Input in Java

25 Likes

Answer

Math.sqrt(a,2) and a**2

Reason — Math.sqrt(a,2) finds square root of the number. a**2 is an invalid expression in Java. It will cause a syntax error.

Answered By

11 Likes


Related Questions