sc.close();写在sc.nextInt();后面呀,你都关闭了,怎么录入
Scanner sc = new Scanner(System.in); System.out.println("12345"); int num = sc.nextInt(); sc.close();
sc.close()放最后