8 AnswersNew Answer
It is useful when you want to save the object you are working with. Any objects you create in your program are stored in memory, which is cleared once your program is closed. This becomes a problem when you want to save the state of your object for the next launch of the program. So, here comes the serialization. Basically, it makes it possible to save object into a file or database (uncommon).
Benjamin Jürgens Sure, it is uncommon. But, as you said, it is possible. This is why I mentioned a database.
Igor Makarsky to save serialized data in a database is very uncommon. You can do that of course (as a BLOB), but for the most part you have one table for every type of object and map each object property to a DB column
Karthik Reddy Thotamgari you serialize Java objects that you have in your running Java program. The major use cases are: - To transmit it. Transmission is done as a byte stream - To save in a file as array of bytes
Just now I've read about serialization in google... That means the process of converting obj state into persistent (permanent) state... To use serialization the class must implement Serializable... And the file must have extension (.ser) ..
To transmit or save in a file
U mean transmission of file?
serialization - the process of transmitting the object to an array of byte deserialization - the reverse process of serialization ie, an array of bytes to an object why: we can reuse this state of an object when needed if it is stored in a file or a database in the stream of bytes(file with .ser extension).