7 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.
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
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
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?