📅  最后修改于: 2022-03-11 14:52:10.992000             🧑  作者: Mango
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner reader = new Scanner(System.in);
System.out.print("Enter the strings > ");
String s1 = new String(reader.nextLine());
String[] str = s1.split(" ");
for(int i=1;i