How to Convert an Integer to a String without Integer.toString Function : <p>This is an extension to a previous question of mine, but I'm required to do this problem without this function. I have to use recursion only. Any thoughts?</p>

<p>An example; 20A would be:</p>

<p>2 x 12^2 + 0 x 12^1 + 10 x 12^0 = 2 x 144 + 0 x 12 + 10 x 1 = 288 + 0 + 10 = 298</p>

<pre><code>public class Duodecimal {
      public static String toBase12(int n) {
        if (n &lt; 10)
            return Integer.toString(n);
        if (n == 10)
            return "A";
        if (n == 11)
            return "B";
        return toBase12(n / 12) + toBase12(n % 12);
      }
    }
</code></pre>
