The Reader and Writer abstract classes define the java character stream. The Reader class is used for character stream-based input, and the Writer class is used for character stream-based output.
Streams are a type of data that is read from a source and written to a destination in Java. To read data from the source, an input stream is utilised. In addition, data is written to the destination using an output stream.
Unicode conventions are used to store characters in Java (Refer this for details). We can read and write data character by character using a character stream. FileReader and FileWriter, for example, are character streams that read from a source and write to a destination.
An input source or output destination is represented by an I/O Stream. Disk files, devices, other programmes, and memory arrays are all examples of sources and destinations that can be represented by a stream.
Streams are a functional way to process a collection of objects in Java. To process list elements, java provides many methods such as map(), flatMap(), filter(), sorted(), and so on, each of which accepts a functional interface type as an argument.