Serializable interface in java

    how serialization works in java
    how serializable works in java
    how serialization works internally in java
    how serializable interface works in java
  • How serialization works in java
  • Serialization and deserialization in java!

    Serialization and Deserialization in Java

    next →← prev

    Serialization in Java is a mechanism of writing the state of an object into a byte-stream.

    Java serialize object to json

  • Serialization and deserialization in rest assured
  • Serialization and deserialization in java
  • Why serialization is required in java
  • What is serialization
  • It is mainly used in Hibernate, RMI, JPA, EJB and JMS technologies.

    The reverse operation of serialization is called deserialization where byte-stream is converted into an object. The serialization and deserialization process is platform-independent, it means you can serialize an object on one platform and deserialize it on a different platform.

    For serializing the object, we call the writeObject() method of ObjectOutputStream class, and for deserialization we call the readObject() method of ObjectInputStream class.

    We must have to implement the Serializable interface for serializing the object.

    Advantages of Java Serialization

    It is mainly used to travel object's state on the network (that is known as marshalling).

    java.io.Serializable interface

    Serializable is a marker interface (has no data member and method).

    It is used to "mark" Java classes so that the objects of these classes may get a certain capability

      what is serialization in java and why it is used
      how does java serialization work