then
new a ArrayList
Secondly, new a LoadStaff , using open() for open the staff.dat (local at the app. folder)
to get the list of staff, using getAllStaff() ;
after edited the list of staff,
must use saveAllStaff() for saving
eg:
import data.*;
ArrayList
LoadStaff loadStaff=new loadStaff();
loadStaff.open();
testStaffList=loadStaff.getAllStaff();
testStaffList.get(i).setName("Hi");
loadStaff.saveAllStaff(testStaffList);

沒有留言:
發佈留言