Streams are the objects that allow and enable the continuous process of reading the data from the source code and writing the data to the destination.

Streams are of four types:

  • Facilitate reading operation (Readable).
  • Facilitate writing operation (Writable).
  • Facilitate both reading and writing operations (Duplex).
  • Kind of duplex stream that performs the computations based on the available inputs (Transform).
BY Best Interview Question ON 26 Jun 2019