title: Java: NumberFormatException in converting string to integer
body: <p>I want to retrieve value from textbox and convert it to integer. I wrote the following code but it throws a <code>NumberFormatException</code>.</p>
  
  <pre><code>String nop = no_of_people.getText().toString();
  System.out.println(nop);
  int nop1 = Integer.parseInt(nop);
  System.out.println(nop1);
  </code></pre>
  
  <p>The first call to <code>System.out.println</code> prints me the number but converting to integer gives an exception. What am I doing wrong?</p>