import com.itheima.StudentManageSystem.Student;
import java.util.ArrayList;
import java.util.Scanner;
public class ScannerTest {
public static void main(String[] args) {
ArrayList list = new ArrayList<>();
Scanner sc = new Scanner(System.in);
System.out.println("请输入学号,姓名,年龄,居住地并用空格隔开:");
String input = sc.nextLine();//获取用户输入
String[] strArr=input.split(" ");//将用户输入以字符串的形式保存到数组
int id= Integer.parseInt(strArr[0]);//用包装类里面的方法将相应的类型转化保存到变量中
String name = strArr[1];
int age = Integer.parseInt(strArr[2]);
String address = strArr[3];
Student student = new Student(id,name,age,address);
list.add(student);
System.out.println(list);
// Scanner sc = new Scanner(System.in);
// System.out.println("请输入");
// String s = sc.nextLine();
// System.out.println(s);
// String[] arr=s.split(" ");
//
// String s1=arr[0];
// String s2=arr[1];
// String s3=arr[2];
int i = Integer.parseInt(s2);
// System.out.println("s1:"+s1+"\ns2:"+s2+"\ns3:"+s3);
}
}