Writing on an Object Stream
public class SerializeTest {
String st = new String("This is the message!");
FileOutputStream f = new FileOutputStream("c:\\test.ser");
ObjectOutputStream s = new ObjectOutputStream(f);
catch (IOException e) { System.out.println(e.getMessage()); }
public static void main(String args[]) { new SerializeTest(); }