title: How to edit a record in java text file?
body: <p>I have a text file which have contents like this:</p>
  
  <pre><code>    1 John 200
      4 Jack 144
      7 Sarah 123
  </code></pre>
  
  <p>the programming format of this record is</p>
  
  <pre><code>     int id, String name, int quantity
  </code></pre>
  
  <p>My question is how to edit record like this:</p>
  
  <pre><code>Enter id of the record you want to edit?
  1
  New Name:
  Terry
  New Quantity:
  700
  </code></pre>
  
  <p>so after doing this the file must be like this:</p>
  
  <pre><code>    1 Terry 700
      4 Jack 144
      7 Sarah 123
  </code></pre>
  
  <p>but I am stuck in this code because I am still a java beginner?</p>