What is File I/O?
Java I/O stream is the flow of data that you can either read from, or you can write to.
It is used to perform read and write operations in file permanently. Java uses streams to perform these tasks. Java I/O stream is also called File Handling, or File I/O. It is available in java.io package.
Java.io package provides classes for system input and output through files, network streams, memory buffers, etc.
Some input-output stream will be initialized automatically by the JVM and these streams are available in System class as in, out, and err variable.
- In reference refers to the default input device, i.e. keyboard.
- Out and err refers to the default output device, i.e. console.