title: Exception in thread "main" java.lang.NumberFormatException: For input string: "1"
body: <p>So I am reading in a CSV file which works fine if everything is a string. But when i try and parse Integers out of the file it no longer will work.</p>
  
  <pre><code>    Scanner scanner = new Scanner(new File("top250.csv"));
      scanner.useDelimiter(",");
  
      while(scanner.hasNextLine()){
         String line = scanner.nextLine();
         System.out.println(line);
  
        String[] parts = line.split(",");
        String rank = parts[0].trim();
        System.out.println(rank);
        int real_rank = Integer.parseInt(rank);
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code> ﻿1, The Shawshank Redemption ,9.2,1994
   ﻿1
   Exception in thread "main" java.lang.NumberFormatException: For input  string: "﻿1"
  at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
  at java.lang.Integer.parseInt(Integer.java:580)
  at java.lang.Integer.parseInt(Integer.java:615)
  at movieranker.MovieRanker.createData(MovieRanker.java:45)
  at movieranker.MovieRanker.main(MovieRanker.java:25)
  </code></pre>