java.lang.NumberFormatException: For input string: "0 "


Samebug tips3

You try to parse a String that contains non-numeric characters to an int. The string must contain decimal characters only, optionally beginning with a + or - sign.


4 weeks ago

Java does not handle IPv6 nameservers before 1.8.0_60. Upgrade to the latest JVM.


5 months ago

Solutions on the web4044

Solution icon of stackoverflow
For input string: "0 "

Solution icon of github
For input string: ""0"

Solution icon of googlegroups
via Google Groups by ijuma, 1 year ago
For input string: "+0"

Solution icon of googlegroups
via Google Groups by mkr, 1 year ago
For input string: "*0*"

Solution icon of oraclecommunity
via Oracle Community by 843793, 1 year ago
For input string: "0

Solution icon of stackoverflow
via Stack Overflow by gpthree
, 1 year ago
For input string: "0 "

Solution icon of web
For input string: ":0"

Solution icon of youtrack
via YouTrack by Unknown author, 1 year ago
For input string: "0 "

Solution icon of github
via GitHub by eirikh1996
, 1 year ago
For input string: "0"

Stack trace

java.lang.NumberFormatException: For input string: "0 "
	at java.lang.NumberFormatException.forInputString(Unknown Source)
	at java.lang.Integer.parseInt(Unknown Source)
	at java.lang.Integer.parseInt(Unknown Source)
	at PredictResult2.parseScore(PredictResult2.java:32)
	at PredictResult2.main(PredictResult2.java:102)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 4 months ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
254 more bugmates