What is InputStream & Output Stream? Why and when do we use them?
问题 Someone explain to me what InputStream and OutputStream are? I am confused about the use cases for both InputStream and OutputStream . If you could also include a snippet of code to go along with your explanation, that would be great. Thanks! 回答1: The goal of InputStream and OutputStream is to abstract different ways to input and output: whether the stream is a file, a web page, or the screen shouldn't matter. All that matters is that you receive information from the stream (or send