title: Unresolved compilation problem: The method parseInt(String) is undefined for the type Integer
body: <p>Why it does not like parseInt? How to fix it?</p>
  
  <pre><code>import java.lang.*;
  import java.io.BufferedReader;
  import java.io.File;
  import java.io.FileNotFoundException;
  import java.io.FileReader;
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.Scanner;
  import java.util.List;
  import java.lang.*;
  
  public class Table {
  
  static class Data
  {
      private String name = "";
      private int num = 0;
  
      public Data(String name, int num)
      {
          this.name = name;
          this.num = num;
      }
  
      public String getName()
      {
          return name;
      }
  
      public int getNum()
      {
          return num;
      }
  
      public String toString()
      {
          return name + " " + num;
      }
    }
  
  
  
     public static void main(String[] args) throws IOException 
    {
  
      List&lt;Data&gt; table  = new ArrayList&lt;Data&gt;();
  
      try
      {
          String filename= ""C:\\input.txt";
          BufferedReader reader = new BufferedReader(new FileReader(filename));
          String line = reader.readLine();
  
          while(line != null)
          {
              String[] tokens = line.split("[ ]+");
  
              String tempname = tokens[0];
              int tempnum = Integer.parseInt(tokens[1]);
  
              Data temp = new Data(tempname,tempnum);
  
              table.add(temp);
              line = reader.readLine();
          }
          reader.close();
      }
      catch(FileNotFoundException n)
      {
          System.out.println("file not found");
      }
      catch(IOException a)
      {
          a.printStackTrace();
      }
  
      for(Data n:table)
      {
          System.out.println(n);
      }
  
         }
  
      }
  </code></pre>
  
  <hr>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
  The method parseInt(String) is undefined for the type Integer
  
  at Table.main(Table.java:58)
  </code></pre>