English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
In this tutorial, we will learn Java input/Output stream and its types.
In Java, streams are sequences of data that are read from a source and written to a target.
OneInput streamUsed to read data from the source. And,Output streamUsed to write data to the target.
class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }
For example, in our firstHello WorldIn the example, we have used System.out to print strings. Here, System.out is an output stream.
Similarly, there are input streams that accept input.
We will learn about input streams and output streams in detail in the following tutorials.
According to the data contained in the stream, it can be classified as:
Byte Streams
Character Streams
Byte streams are used to read and write individual bytes (8data (bit).
All byte stream classes are derived from the basic abstract classes called InputStream and OutputStream.
For more information, please visit
Character streams are used to read and write individual data characters.
All character stream classes are derived from the basic abstract class Reader and Writer.
For more information, please visit