Converting Letters to Numbers
<p>Let's say I have a program which converts letters to numbers such that:</p>

<p>Input: abcd</p>

<p>Output: 1234</p>

<ol>
<li>How can I convert abcd to 1234 efficiently</li>
<li>and how can I extract every individual char from the token</li>
</ol>

<p>By the way, this is not homework. (this is for fun)</p>

<p>This is what I have so far:</p>

<pre><code>public class Test {
public static void main(String[] args) throws IOException  {

    BufferedReader f = new BufferedReader(new FileReader("test.in"));

    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("test.out.txt")));

    StringTokenizer st = new StringTokenizer(f.readLine());

    int i1 = Integer.parseInt(st.nextToken());

            // How can I convert this into integers? (where a = 1, b = 2, and c = 3)

            out.println(????);

        out.close();
        System.exit(0);                              

    }

}
</code></pre>
