Lets say I have 5 objects of some class A (obj1, obj2, obj3, obj4, obj5).
Now I am saving them in a file named "ABC" in order (obj1, obj2, obj3, obj4, obj5).
After saving them lets say the state of object obj3 changes and now i want to update the state of obj3 in file.
Method That i know how to do that is : Create Another file "XYZ" and first save obj1 and obj2 from the "ABC" into "XYZ", then save obj3(with changed state) and then save obj4 and from the "ABC" into "XYZ".
I want to know
1).Is their any better way by which i can do this?
2).Can i travel through the objects in file and can perform Deletion and Updation of a Object by some method?