Java Input Output - IO Streams Interview Questions Answers - 1
Question: 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.
Question: 2
What is a stream?
A Stream is an abstraction that either products or consumes information.
Question: 3
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.
Question: 4
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.
Question: 5
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.
SBI PO Mains Computer Aptitude Questions Pdf More
IBPS PO Mains Computer Aptitude Questions Pdf More
Information technology MCQ Questions with Answers Pdf More
Computer Trivia Questions and Answers Pdf More
Computer Science Question Paper for Class 11, 12 More
7000+ Preposition Questions and Answers for Class 10 More
Top 10,000+ Computer Basics Quiz More
7th Social Geography Unit 3 Questions More
1000+ TNPSC VAO Study Material in Tamil and English 2023-2024 Pdf More
Computer Knowledge Questions Answers for Bank PO Exams More