When reading data from the Java character stream, why can't it be displayed if it is not converted to the char type?

10
:1.System.out.println(data)System.out.print(data)txt

this is the same code. After I get the data, I will not convert it to char type, but directly str+=data, it. This is the output of null,. If I convert it to char type str+= (char) data, I will be able to splice the read data into strings. Why? I think if I don"t convert char, I can at least put the int value together?
although I can avoid these practical tasks, I still want to ask the deep-seated reason, because I can get the answer.

Mar.16,2021

console display problem. Modify console buffer size or check fixed with console to make it branch display
null is also followed by a number. The reason is the same as the first console display. You can try a txt with a smaller amount of data.

Menu