Modern computers have many input/output (i/o) devices. Any modern programming language should provide methods to work with them. Java is no exception. However, at this stage, we will discuss only conventional devices like keyboard and monitor. We will discuss files in a separate chapter. These days most of the programs use GUI. Input/output techniques for these applications will be discussed later.
At this stage, we will concentrate only on console input/output.
From the days of C language, input/output is made stream based. The data is supposed to flow as a stream. Languages support methods to work with these streams.
When data flows from input device to computer (CPU to ...