In this article, we’ll learn how to serialize and de-serialize a simple Java object.First, let’s create an object model class ( User.java) as follows: package This is a marker interface which tells the JVM that the class is eligible for serialization. In Java, an object of a class is serializable if the class implements the java.io.Serializable interface. Serialization is the process of saving an object’s states in a persistent format (such as file stream or database), and later restoring them back from the stream (de-serialization).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |