You are on page 1of 2

Input and output stream in java-

 Java I/O (Input and Output) is used to process the input and produce the
output.
 Java uses the concept of a stream to make I/O operation fast.

Stream

 Streams are the sequence of data that are read from the source and written
to the destination.

There are Two Basic types of Streams:-

1) Input Streams:- An input stream is used to read data from the source it
may be a File, Memory or Console.

 FileInputStreams are the Subclass of Input Streams.

2) Output Streams:- An output stream is used to write data to the


destination it may be a File, Memory or Console.

 FileOutputStreams are the Subclass of Output Streams.


 FileWriter:- FileWriter is used to write a streams of character to a file.

 FileReader:- It reads data as a streams of character from a file.

You might also like