Serializable interface is just only used to tell that this class can
be serialized thats all... no logic lies there, although you can
serialize your object by
File f0 = new File("d:/abc.obj");
FileOutputStream fos = new FileOutputStream(f0);
ObjectOutputStream os = new ObjectOutputStream(fos);
myObject mo = new myObject();
// do some thing with mo
//......
os.writeObject(mo);
os.flush();
os.close();
and you may deserialize the same object by
FileInputStream fis = new FileInputStream(f0);
ObjectInputStream ois = new ObjectInputStream(fis);
myObject mo2 = (myObject) ois.readObject();
ois.close();
the logic lies in the ObjectOutputStream and ObjectInputStream, you
may also add the variable
static final long serialVersionUID = -1564731489190550833L;
for maintaining the serialized versioning for your class.