Strange Integer.parseInt exception
Posted
by Albinoswordfish
on Stack Overflow
See other posts from Stack Overflow
or by Albinoswordfish
Published on 2010-03-23T00:15:18Z
Indexed on
2010/03/23
0:21 UTC
Read the original article
Hit count: 558
java
Exception in thread "Thread-2" java.lang.NumberFormatException: For input string: "3"
int test = Integer.parseInt(result[0]);
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.
If anybody has any idea what could be causing this it would be appreciated.
© Stack Overflow or respective owner