title: Which of recursion method is better and why for reverse digits of integer?
body: <pre><code>public static int recursiveReverse(int number, int reversenumber){
  
      if(number &lt;= 0) {
          return reversenumber;
      }
  
      reversenumber = reversenumber * 10 + (number % 10);
      number = number/10;
  
      return recursiveReverse(number, reversenumber);
  }
  </code></pre>
  
  <p>OR </p>
  
  <pre><code>private static int reversenumber = 0;
  
  public static int recursiveReverse(int number){
  
      if(number &lt;= 0) {
          return reversenumber;
      }
  
      reversenumber = reversenumber * 10 + (number % 10);
      number = number / 10;
  
      return recursiveReverse(number);  
  }
  </code></pre>