Java Input Output - IO Streams Interview Questions Answers - 1
What is object serialization?
Serializing an object involves encoding its state in a structured way within a byte array.
Once an object is serialized, the byte array can be manipulated in various ways; it can be written to a file, sent over a network using a socket based connection or RMI, or persisted within a database as a BLOB.
The serialization process encodes enough information about the object type within the byte stream, allowing the original object to be easily recreated upon deserialization at a later point in time.
What is a stream?
A Stream is an abstraction that either products or consumes information.
What are the types of Streams and classes of the Streams?
There are two types of Streams and they are
Byte Streams: Provide a convenient means for handling input and output of bytes.
Character Streams: provide a convenient means for handling input and output of characters.
Byte stream classes: Are defined by using two abstract classes, namely InputStream and OutputStream.
Character Streams classes: are defined by using two abstract classes, namely Reader and Writer.
What is serialization and deserialization?
Serialization is the process of writing the states of an object to byte stream.
Deserialization is the process of restoring these objects.
What is a transient variable?
A transient variable is a variable that may not be serializable.
If you don’t want some field to be serialized, you can mark the field transient or static.
100+ TNPSC General Studies Question Paper with Answers More
100+ TNPSC Indian Economy Mock Test More
100+ World Economy Objective Type Questions and Answers More
100+ Economics Quiz Questions and Answers Pdf More
100+ Software Testing Multiple Choice Questions Answers More
Previous 10 Years Question Papers with Answers for TRB Botany More
Windows XP Multiple Choice Questions and Answers More
1000+ Computer Knowledge Questions for RBI Assistant More
Top 29+ Folk Dances of India State wise Pdf for SSC, UPSC, PSC, Bank More
Top 50+ Java Networking Interview Questions and Answers More