Do you know the difference InputStream and Reader?

140 阅读1分钟

This problem is very common and most programmers don't understand the difference. In fact, one sentence explains: If there is Chinese, what should I do? Use byte to assemble yourself? Convert to String? Neither is the best solution. The easiest way is to use Reader/Writer.

For coding problems, I recommend using UTF-8 and GBK.

This is the basic skill of the programmer. If you don't understand it, you must be troubled by garbled problems and search for solutions online. Most programmers with poor basic skills do not have the ability to ask questions too.