How to save large amounts of similar objects?
A String in java cannot be deleted, nor changed or overwritten.
I have an Object.txt (20000 lines, 1 Object description per line) and a constructor Object(String line) to convert the .txt file into an Array of 20000 Objects.
Objects is no problem, read line -> Object. But then?
How can I avoid that I end up with 19999 lines as garbage, to be collected the week after next or later?
Or is the idea wrong and is the protocol completely different?