Java Math.pow Through Code Examples
I'm sure you have already experienced odd results when calling Math.pow method. I know, I've been there too!
Math.pow(double a, double b)
returns the value of a
raised to the power of b
.
It's a static method on Math
class, which means you don't have to instantiate a Math
instance to call it. The power of a number is the number of times the number is multiplied by itself.