title: Converting a substring to an Int in Java
body: <pre><code>List&lt;Book&gt; myLibrary = new ArrayList &lt;Book&gt;(312); 
  public BookLibrary (Scanner inFile){
      while(inFile.hasNextLine()){
       String aBook = inFile.nextLine();
       String title = aBook.substring(0, 32).trim();
       String language = aMovie.substring(33, 40).trim();
       String rating = aMovie.substring(41, 50).trim();
       int hardCover = Integer.parseInt(aBook.substring(51, 55).trim()); 
       int paperBack = Integer.parseInt(aBook.substring(56));
       myLibrary.add(new  Book (title, language, rating,
       hardCover, paperBack));
       count++;
      }
  </code></pre>
  
  <p>Just some example code here. I am trying to figure out why I am receiving this runtime error when I attempt to run my program. I have no compiler errors in my program.</p>
  
  <pre><code>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 MovieCollection.&lt;init&gt;(BookLibrary.java:21)
  </code></pre>