title: Reading and Writing to the same file simultaneously in java
body: <p>How can I access data in my file without first closing my BufferedWriter?</p>
  
  <pre><code>import java.io.BufferedReader;
  import java.io.BufferedWriter;
  import java.io.File;
  import java.io.FileReader;
  import java.io.FileWriter;
  import java.io.IOException;
  
  
  public class Tp {
      public static void main(String[] args) throws IOException{
          File f = new File("Store.txt");
          BufferedWriter bw = new BufferedWriter(new FileWriter(f));
          BufferedReader br = new BufferedReader(new  FileReader(f));
          bw.write("Some text");
          System.out.println(br.readLine());
          bw.write("Some more text");
          bw.close();
          br.close();
      }
  }
  </code></pre>
  
  <p>The console is showing null. How do I fix this?</p>