一、Scanner使用基本步骤1、导包 import java.util.Scanner; 2、创建对象 Scanner sc=new Scanner(System.in); 3、接受数据 int i=sc.nextInt();