Computer Applications
State the value and type of each expression.
Math.sqrt(Math.pow(2.7, 2))
Answer
The output value is 2.7. The type of expression is double.
Explanation
Math.pow(2.7, 2) will calculate square of 2.7 as we are raising it to the power 2. After this, calculating square root with Math.sqrt() will return the same number 2.7. The return type of Math.sqrt() is double so the type of expression is double.