Strange Integer.parseInt exception
<blockquote>
  <p>Exception in thread "Thread-2"
  java.lang.NumberFormatException: For
  input string: "3"</p>
</blockquote>

<pre><code> int test = Integer.parseInt(result[0]);
</code></pre>

<p>This is the error I keep getting when I'm trying to convert "3" to an integer. Well I'm receiving this "3" through a RS-232 port, so maybe this is what is causing the error.</p>

<p>If anybody has any idea what could be causing this it would be appreciated.</p>
