title: Java-Convert String to int when using BufferedReader
body: <p>How do you convert a String to int when using BufferedReader?
  as far as i remember,its something like below:</p>
  
  <pre><code>System.out.println("input a number");
  
  int n=Integer.parseInt(br.readLine(System.in));
  </code></pre>
  
  <p>but for some reason,its not working.</p>
  
  <p>the error message says:</p>
  
  <p>no suitable method found for <code>readLine(java.io.InputStream)</code></p>
  
  <p>it also says <code>br.readLine</code> is not applicable</p>