【求助】EditPlus编译完成如何键盘输入? class Guess1 {
public static void main(String args[])
throws java.io.IOException {
int i;
char num ='6';
System.out.println("a number between 0 and 10.");
System.out.print("what is it: ");
// 从键盘上输入一个数字
i = System.in.read();
if(i==num) System.out.println("You are talent!");
}
}
有好的解决方法吗?谢谢!!! ------最佳解决方案-------------------- 先转成char再比较