Java 如何使结果为true
BufferedReader getkeyWords = new BufferedReader(new InputStreamReader(System.in));
char[] buf = new char[1024];
System.out.println("Please Input the Key");
getkeyWords.read(buf);
String temp = new String(buf);
System.out.println(temp.equals("一"));
------解决方案--------------------
空格啊
System.out.println(temp.trim().equals("一"))
或者
getkeyWords.read(buf);
String temp = new String(buf);
改为
int i = getkeyWords.read(buf);
String temp = new String(buf,0,i);