View RSS Feed

My Java Tips

  1. Persisting state of objects

    by , 11-13-2011 at 11:24 AM (My Java Tips)
    Serializable interface has no methods and fields so a class that implementing this interface does not have to override any method. The state of objects of serializable class, can be saved and restored later. The state is saved on a container that may be transient (RAM-based) or persistent (disk-based).


    For network communication, the objects that you want to transfer through streams, should be Serializable. For instance, Vector, ArrayList etc implement Serializable interface so their ...