+ 1
I did not understand what Math.pow() was doing?
3 Réponses
+ 7
The java.lang.Math.pow(double a, double b) returns the value of the first argument raised to the power of the second argument. Special cases − If the second argument is positive or negative zero, then the result is 1.0. If the second argument is 1.0, then the result is the same as the first argument.
example:
In Math 2^8 = 2x2x2x2x2x2x2x2 =256
In Java Math.pow(2, 8)
+ 6
😊
0
Thanks