Scanner input = new Scanner(System.in);
ArrayList<String> list = new ArrayList();
String string = input.nextLine();
String[] a = string.split(" ");
for(int i = 0;i<a.length;i++) {
list.add(a[i]);
}
for(int i = 0;i<list.size();i++) {
System.out.println(list.get(i));
}
2021-03-27
最新推荐文章于 2021-12-17 10:53:56 发布