数据输入 Scanner的使用步骤 1.导包 java.util.scanner; 导包的的动作必须定义在类的上面 2.创建对象 Scanner sc=new Scanner(System.in); 3.使用 int i=sc.nextInt();