Complete the following method that returns x
raised to the n
power.
The method must throw an IllegalArgumentException
if n
is negative.
Your implementation must use recursion and may not use the Math
class
or any loops.
Stuck? You may find these lessons helpful: