xxxxxxxxxx
InputStream is used to read data from sources like File, Socket, or Console, while OutputStream is used to write data into a destination like a File, Socket, or Console.
Read more: https://www.java67.com/2020/02/40-java-io-and-files-interview-questions-answers.html#ixzz7oOvHYx5M