math exponent in java code example Example 1: raise number to power java Math.pow(number, power); Example 2: exponents java math.pow(number, power);