javascript split string to array by space code example
Example: how to saperate string to array
Scanner in=new Scanner(System.in);
String input=in.nextLine();
String[] word=input.split(" ");
Scanner in=new Scanner(System.in);
String input=in.nextLine();
String[] word=input.split(" ");