title: Recursive Exponent Method
body: <pre><code>public static int exponent(int baseNum) {
      int temp = baseNum *= baseNum;                
  
          return temp * exponent(baseNum);             
  }
  </code></pre>
  
  <p>Right now the method above does n * n into infinity if I debug it, so it still works but I need this recursive method to stop after 10 times because my instructor requires us to find the exponent given a power of 10.</p>
  
  <p>The method must have only one parameter, here's some examples of calling exponent:</p>
  
  <pre><code>                System.out.println ("The power of 10 in " + n + " is " + 
                      exponent(n));
  </code></pre>
  
  <p>So output should be:</p>
  
  <pre><code>The power of 10 in 2 is 1024
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>The power of 10 in 5 is 9765625
  </code></pre>