Here we will talk about the definition of Serialization and deserialization.

Serialization:

  • When we have to save an object into the disk or send the data over the network then we use this concept.
  • It converts data into byte stream or stream of character that contains all the information related to that object.
  • The serialized stream can be encrypted, authenticated and compressed, supporting the needs of secure Java computing.
  • Serialization can also be used as a mechanism for exchanging objects between Java and C++ libraries.

Deserialization:

It is the opposite process of serialization. Here we convert byte stream into the actual object.