I would like to update specific part of a text file using Java. I would like to be able to scan through the file and select specific lines to be updated, a bit like in a database, for instance given the file:
ID Value 1 100 2 500 4 20 I would like to insert 3 and update 4, e.g.
ID Value 1 100 2 500 3 80 4 1000 Is there a way to achieve this (seemingly) easy task? I know you can append to a file, but I am more interested in a random access