Scanner scanner = new Scanner(System.in); int i = scanner.nextInt(); System.out.println(i);
这代码也没报错呀,只是提示你,你创建的变量没有被使用