Computer Applications
State the value and type of each expression.
Math.pow(4, -2)
Java Math Lib Methods
10 Likes
Answer
The output value is 0.0625. The type of expression is double.
Explanation
Math.pow(x, y) returns x raised to the power of y as a double value. Math.pow(4, -2) is equivalent to 4-2 i.e., = 0.0625. Hence, output is 0.0625 and data type of result is double.
Answered By
1 Like