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

后端 未结 4 1761
星月不相逢
星月不相逢 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:19

    Stream is for reading bytes, Reader is for reading characters. One character may take one byte or more, depending on character set.

提交回复
热议问题