Streams:
Java programs perform I/O by streams. A stream is an abstraction which either consumes or produces information. A stream is linked to a physical device through the Java I/O system. All streams behave in the similar manner, even if the actual physical devices to that they are linked differ. Therefore, the similar I/O classes and methods can be applied to any type of device. This means in which an input stream can abstract several different types of input: from a disk file, a keyboard, or a network socket. Similarly, an output stream might refer to the console, a disk file, or a network connection. A Streams are a clean way to deal with input/output without having each part of your code understand the difference among a keyboard and a network, for instance, . Java implements streams inside class hierarchies defined in the java.io package.