Java Interview Questions and Answers for Beginners Pdf - 1

Question: 1

What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

The Reader/Writer class hierarchy is character oriented, and the InputStream and OutputStream class hierarchy is byte oriented.

Question: 2

What is the purpose of the file class?

The File class is used to create objects that provide access to the files and directories of a local file system.

Question: 3

What is an I/O filter?

An I/O filter is an object that reads from one stream and writes to another usually altering the data in some way as it passed from one stream to another.

Question: 4

What happens to the object references included in the object?

The serialization mechanism generates an object graph for serialization.

Thus it determines whether the included object references are serializable or not, this is a recursive process.

Thus when an object is serialized, all the included objects are also serializable along with the original object.

Related Questions