What is Stream in Java?
A stream is a sequence of data. A program uses an input stream to read data and an output stream to write data to the destination. A stream can be a file, devices, memory arrays etc. A stream can be of many types: Byte Stream, Character Stream, Buffered Stream, Object Stream.