0 votes
in JAVA by

What is serialization in java?

2 Answers

0 votes
by

What is serialization in java?

Object Serialization is a process used to convert the state of an object into a byte stream, which can be persisted into disk/file or sent over the network to any other running Java virtual machine. The reverse process of creating an object from the byte stream is called deserialization.

0 votes
by

Serialization in Java is a mechanism of writing the state of an object into a byte stream. It is used primarily in Hibernate, RMI, JPA, EJB and JMS technologies. It is mainly used to travel object's state on the network (which is known as marshaling). Serializable interface is used to perform serialization. It is helpful when you require to save the state of a program to storage such as the file. At a later point of time, the content of this file can be restored using deserialization. It is also required to implement RMI(Remote Method Invocation). With the help of RMI, it is possible to invoke the method of a Java object on one machine to another machine.

Related questions

+1 vote
asked Jan 20, 2022 in JAVA by rajeshsharma
+1 vote
asked Jul 27, 2021 in JAVA by SakshiSharma
...