title: java.lang.NumberFormatException: For input string: "22"
body: <pre><code>public void loadFromFile(String filename) {
      File file = new File(filename);
      BufferedReader br;
  
      try {
          br = new BufferedReader(new FileReader(file));
          numberOfAttributes = Integer.parseInt(br.readLine());
      } 
      ...
  }
  </code></pre>
  
  <p>Above is my program: I am trying to read from a txt file where the first line is the number 22 and nothing more. I don't know why the program gives me an exception.</p>