What is serialization in java?



What is serialization in java?..

Answer / Varunt Yagi

Serialization in Java refers to the process of converting an object (or graph of objects) into a byte stream or sequence of bytes that can be written to a file, transmitted over a network, or stored in a database. The purpose of serialization is to enable data persistence and object transfer between Java applications. Java uses an Object Output Stream for serializing the objects and an Object Input Stream for deserializing them.nDuring serialization, all the fields (private variables) of an object are converted into a sequence of bytes along with their data types using a process called marshalling.nBy default, Java provides the ability to serialize most built-in data types (such as int, double, String), arrays, and custom classes that implement the Serializable interface.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are the methods used to implement for the key object in the hash map?

1 Answers  


What is difference between java and java ee?

1 Answers  


Is null or empty java?

1 Answers  


How do you make an arraylist empty in java?

1 Answers  


When is an object subject to garbage collection?

1 Answers  


How do I compare two strings in word in java?

1 Answers  


How java uses the string and stringbuffer classes?

1 Answers  


What is the integer of 16?

1 Answers  


what is the difference between HashMap and Hashtable

17 Answers   Value Labs, Virtusa,


What does t in java mean?

1 Answers  


What is treemap in java?

1 Answers  


Why parsing is done?

1 Answers  


Categories