title: "java.io.IOException: Stream closed" with new BufferedReader
body: <p>Many people asked question like that but this one is a little bit different. Here is the code:</p>
  
  <pre><code>public static BufferedReader reader;    
  public static String readString() throws IOException {
              reader = new BufferedReader(new InputStreamReader(System.in));
              String s = reader.readLine();
              reader.close();
              return s;
          }
  </code></pre>
  
  <p>While program runtime <code>readString</code> method is invoked many times. The second call causes <code>exception: stream closed</code>. I can not understand: why it ends up so? Every time we declare new <code>BufferedReader</code>. So the <code>stream</code> must be also new. Or not?</p>
  
  <p>If not, how should I organize my program so that it will close reader after all invocations and after my program is over?</p>