彭于晏们请看看这串代码
FileInputStream stream=new FileInputStream("Game\\\\a.txt");
System.out.println((char) stream.read());
System.out.println((char)stream.read());
System.out.println((char)stream.read());
System.out.println((char)stream.read());
System.out.println((char)stream.read());
System.out.println((char)stream.read());
System.out.println((char)stream.read());
System.out.println((char)stream.read());
stream.close();
读取的文件中只有五个字节abcde。
最后运行的结果是:
a
b
c
d
e
13
10
-1
就想问问吴彦祖们,这个13和10是啥啊。