Skip to main content

Posts

Showing posts with the label Serialization and Deserialization

Serialization and Deserialization Interview Questions in Java

Serialization and Deserialization 1. What is the serialization? Serialization is a process converting an object into a byte array. This byte array represents the class, version and internal state of the object. JVM can use this byte array to transmit/read the object over a network. 2. What is the purpose of serialization? Some of the uses of serialization are: 1.      Communication : It is used for transmitting an object over network between two machines. 2.      Persistence : We can store the object’s state in a database and retrieve it from database later on. 3.      Caching : Serialization can be used for caching to improve performance. We may need 10 minutes to build an object, but it may take just 10 seconds to de-serialize the object. 4.      Cross JVM Synchronization : It can be used in same way across multiple JVM that follow different architecture. 3. What is D...