title: How do I change an integer that is given by the user to a string?
body: <p>I have been working on a method for a program, and I need to change the integer in the method into a string without changing the method header.  The output of this method needs to be able to have a zero at the beginning, and the only way I can think of doing this is by a string.  I have tried various different ways, but I'm not sure how it is supposed to work if you don't have a predefined number to work with.  The internet has been no help with this so far.  Can anyone help point me in the right direction?</p>
  
  <pre><code> public static int encrypt(int num)
    {
      int digit4 = (num + 7) % 10;
      num /= 10;
      int digit3 = (num + 7) % 10;
      num /= 10;
      int digit2 = (num + 7) % 10;
      num /= 10;
      int digit1 = (num + 7) % 10;
      num /= 10;
      return (digit3 * 1000 + digit4  * 100 + digit1 * 10 + digit2);
    }
  </code></pre>