我在输入int i=sc.nextint();时提示了错误,nextint前的点是英文状态下的,为啥会报错呢。下面是源码,请大家帮忙分析下,谢谢了。
import java.util.Scanner;
public class ScannerDemo001{
public static void main(String[]args){
Scanner sc = new Scanner(System.in);
int i = sc.nextint();
System.out.println(i);
String s = sc.next();
System.out.println(s);
}
}
|
|