Which of the following is TRUE for serialization in JAVA?

Options
- Process of converting classes’ instance into stream of bytes
- Doesn’t help in persisting data
- Both a and d
- An operation in which an object’s internal state is converted into a stream of bytes


CORRECT ANSWER : An operation in which an object’s internal state is converted into a stream of bytes

Discussion Board
Serialization

Serialization provides a way where an object can be represented as a sequence of bytes which includes the object's data and information having the object's type and the types of data stored in the object. It can only be read from the file after the serialized object is written into a file. The process of serilization in Java is JVM independent which allows the serialization to take place on one platform and de-serialization on another platform.

Classes ObjectInputStream and ObjectOutputStream are high-level streams that contain the methods for serializing and deserializing an object.

Rohit Sharma 08-11-2014 07:38 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement