1 Reply Latest reply on Jan 18, 2013 6:15 PM by gimbal2

    Exception in thread main

      Please can someone help me out with this code errors?
      Exception in thread "main" java.lang.NumberFormatException: For input string: ""

      at java.lang.NumberFormatException.forInputString(Unknown Source)
      at java.lang.Integer.parseInt(Unknown Source)
      at java.lang.Integer.parseInt(Unknown Source)
      at BufRead.main(BufRead.java:28)
        • 1. Re: Exception in thread main
          You'd have to post the code.

          But what is so hard to understand here? Apparently you have some code which tries to parse a String into an integer (I'm guessing when read from the command prompt / shell), but in this case it is given an empty string and an empty string cannot be transformed into a number. Hence the exception. Its not a code error, it just a regular problem that can happen in an application that you need to deal with somehow.