#corejavainterviewquestions

Опубликовано: 18 Октябрь 2024
на канале: SJ Programming Solutions
261
14

#corejavainterviewquestions What is Serialization , Deserialization and Transient Keyword in java ?

Serialization :

Serialization is process of converting Object into byte stream. To Serialize object we need to implement Serializable interface.

Deserialization :

Deserialization is a process of converting byte stream into an Object. We use readObject() method for deserialization.

What is Transient Keyword ?

Transient is a variables modifier used in serialization. At the time of serialization, if we don't want to save value of a particular variable in a file, then we use transient keyword.
While serialization if we use transient keyword for field then the actual value of that field will not be saved instead it will save default value.

What is serialization ?
What is deserialization?
what is trasient keyword in java ?
Can we use transient with final and static ?
what is the use of serialization ?
Core Java interview Questions and Answers.
#sjprogrammingsolutions #javainterviewquestions #crackinterview