16.01. Data streams

Data streams

  • Eclipse: Oxygen
  • Java: 1.8

Data streams

The stream is a sequence of data. It could be a sequence of input, output, or error streams. As the name suggests it performs input and output operations. It is used for the purpose of input and output respectively.

In Java, streams are automatically created for us. All these streams are attached to the console.

  1. System.out: Output stream is used to write a file.
  2. System.in: input stream is used to read a file.
  3. System.err: error stream is used to handle or show the error.

Contributed by: Poonam Tomar

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments