arraylist - Java overwrite with serializable -


I'm reading in a set of data from serializable and as a result I get 2 sets of data, the old one is already There was and I have loaded the new way. I managed to create a different data set and its functions but this is not the ideal solution here. I am loading content in array list, but instead of emptying this entry, it seems to be empty. So I was wondering how do I overwrite serialjays? Here's my current code that I use to load data into:

  // students.clear (); //modules.clear (); Model M = new model (); Meter = Model.readModule ("out.ser"); M.findStudent ();  

As I said it prepares a new instance of the model, but I would rather replace it with the current charge, but I am not sure how to do it is.

If you have a student and module array list, then you can:

< Pre> students.clear (); Modules.clear (); Model m = model Radium ("out."); Students.addAll (m.getStudentsList ()); Modules.addAll (m.getModulesList ());

Hope it helps.


Comments