TestSerializable test = new TestSerializable();
// Create an binary output stream "test.dat"
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(
new File("c:\\test.dat")));
// Save the two person objects
test.saveAllData(oos);
// Close the file
oos.close();
// Open a binary intput stream "test.dat"
ObjectInputStream ois = new ObjectInputStream(new FileInputStream(
new File("c:\\test.dat")));
// Retrieve the two person objects
test.loadAllData(ois);
// Close the input stream
ois.close();
// display the two person objects.
test.displayAllData();