help with convert in java for android
<p>I have this code in C#, I have tried to convert him to Java for android, but I get an error in doing so. </p>

<p>This is the C# code:</p>

<pre><code>sum = "";
string Num = "123ABC";
int i, j;
string TmpOT;
for (i = 0; i &lt; Num.Length; i++)
{
    TmpOT = Num.Substring(i, 1);
    j = Convert.ToChar(TmpOT);
    j = (j / 10) + (j % 10);
    if (j &gt;= 10)
    {
        j = (j / 10) + (j % 10);
    }
    sum += j.ToString();
}
</code></pre>

<p>And this my attempt at converting it to Java:</p>

<pre><code>for (i = 0; i &lt; Num.length(); i++)
{
    TmpOT = Num.substring(i, 1);
    j = Convert.ToChar(TmpOT);
    j = (j / 10) + (j % 10);
    if (j &gt;= 10)
    {
        j = (j / 10) + (j % 10);-
    }
    Sum += String.valueOf(j);
}
</code></pre>

<p>the error is in line 5 - convert to char</p>
