可能是没有在接收输入之前判断输入类型是否为 int 示例 public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("请你输入一个数字 :")