What is the difference between a stream and a reader in Java?

后端 未结 4 1768
星月不相逢
星月不相逢 2020-12-13 20:49

Today I got this question for which I think I answered very bad. I said stream is a data that flows and reader is a technique where we read from that is a static data. I kno

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-13 21:36

    An InputStream is byte-oriented. A Reader is character-oriented.

    The javadocs are your friend, explaining the difference. Reader, InputStream

提交回复
热议问题