Java IO Streams Interview Questions and Answers

Java IO Streams Interview Questions (or) Java IO Interview Questions

Java Io Streams: Java Io streams are used to store and read data from the files and read the data from the keyboard. A stream is a logical connection between a java program and a file. A stream can be defined as a continuous flow of data between the java program and persistence media. This article is about Java IO Streams Interview Questions and answers for freshers and Experienced for interview.
Java IO  Interview Questions and Answers for freshers and Experience


Java IO Streams Interview Questions (or) Java IO Interview Questions

1) What is Stream?

A) A stream is a logical connection between a java program and a File.
                             (or)
A stream can be defined as a continuous flow of data between the java program and persistence media.

2) How many types of Streams are there?

A) There are two types of Streams they are:
1) Input Stream.       
2) Output Stream.

3) What is the Input Stream?

A) The Stream that allows data to come into Java application from the persistent media is called an Input Stream. Input Stream is used to read the data from persistent media.

4) What is Output Stream?

A) The Stream that allows data to send out from the Java application to be stored into the persistent media is called Output Stream. Output streams are used to write data in persistent media from a Java application.

5) How data is sent to Streams in Java?

A) In Java data is send to Streams in the format of Bytes or Characters.

6) How many types of Java Streams are there in Java?

A) There are two types of Java Streams are there in Java. They are:
1) Binary Stream.
2) Character Stream.


Java IO Streams Interview Questions (or) Java IO Interview Questions

7) What is Binary Stream?

A) The Stream which read and write data in the format of bytes is called Binary Streams.

8) What is Character Stream?

A) The Streams which read and write data in the format of characters is called Character Streams.

9) What is Sequence Input Stream?

A) This class is used to read data from multiple Input Streams Sequentially.

10) What is File InputStream?

A) File InputStream is a subclass of InputStream and Closeable, Autocloseable interfaces. File InputStream class is used to read data from a File.

See More Java Interview Questions: Java strings interview questions Java collections interview questions Java exception handling interview questions Java multithreading interview questions  Core Java interview questions Java constructor interview questions Java Interview Questions

Java IO Streams Interview Questions (or) Java IO Interview Questions

11) What is File OutputStream?

A) File OutputStream is a subclass of OutputStream and Closeable, Flushable, AutoCloseable interfaces. File OutputStream is used to write data to a File.

12) What are the limitations of File InputStream and File OutputStream?

A) File InputStream and File OutputStream allow User to read and write data Only in the format of bytes. It is not possible to read (or) write data in the format of primitive data or objects.

13) What is Data InputStream?

A) Data InputStream is used to read data as primitive types.

14) What is Data OutputStream?

A) Data OutputStream is used to write data as primitive types.

15) What are the limitations of Data InputStream and Data OutputStream?

A) Using Data InputStream and Data OutputStream user cannot read and write objects from persistent media. They have the capability only to read data up to primitive data types.


Java IO Streams Interview Questions (or) Java IO Interview Questions

16) What is Object InputStream?

A) Object InputStream is used to read data as an Object.

17) What is Object OutputStream?

A) Object OutputStream is used to write data as Object.

18) What is Serialization?

A) Serialization is the process of converting objects into a stream of bytes and sending them to OutputStream. Using Serialization we can store object state permanently in the destination.

19) What is Deserialization?

A) Deserialization is the process of converting a stream of bytes into the original location.


Java IO Streams Interview Questions (or) Java IO Interview Questions

20) What is Marker Interface?

A) The Interface using which user can explicitly mention (or) Mark certain properties to an Object is known as Marker Interface.

21) Explain about Transient Keyword?

A) At the time of serialization if we don’t want to save the original value of a variable then it should be declared as Transient. The transient keyword is applicable to only for variables. 

Also Read:  USPS Tracking USPS Hold Mail TCS Webmail Liteblue Liteblue login bookzz liteblue usps gov human resources Hotmail login JCPenney Associate Kiosk Java switch case Factorial program in java Polymorphism in Java
Share:

Our Services

Search This Blog

  • ()
Powered by Blogger.

C Data Types and Types of data types in C

Data types specify the type of data that a variable can store. All C compilers support Five fundamental data types, they are an integer(int...