Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是代码:
public static void main(String args[]) throws IOException { int i = System.in.read(); System.out.println(i); }
例如,当我输入 13 时,它会打印出 49..?这是为什么?我该如何解决?
read 读取单个字符,1(字符)的 int值为 49
1
int