title: java: read and write on a file at the same time ,concurrency on file
body: <p>I want to write in a <strong>text file</strong> and read from that <strong>at the same time</strong>.
  I want to use a text file as my database in a site and client 
  can request to save sth on it.how can I save to, and read from a file
  at the same time. I am <strong>beginner</strong> in java and I had an interview yesterday
  and they ask me to do sth like that.</p>
  
  <p>Thank you so much</p>