serialization
Given the following class:
Sample Class:House.java
import java.util.*;
publicclass House{
private String name;
private String comments;
private ArrayList residentList =new ArrayList();
publicvoid addResident(Resident resident){
this.residentList.add(resident);
}
publicboolean removeResident(Resident resident){
return this.residentList.remove(resident);
}
publicvoid setResidentList(ArrayList residentList){
this.residentList = residentList;
}
public String setComment (String c){
c = setComment;
return c;
}
public List getHouseList(){
return residentList;
}
public String toString (){
return name.toString();
}
}
Other classes are very much in the same shape,Resident.java, Street.java. which classes have further attributes and methods.
I would like to know how to Serialize the files into a single binary file. Also, how can i retrieve back all such data at once; due to the fact the from House.java, there are methods to call a list of Residents.
Thanks alot for your kind support.

