JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
Author: voja
Input example: Hi there
➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
*/
import java.util.Scanner;
public class Java{
public static void main(String[] args){
Scanner reader=new Scanner(System.in);
String[] input=reader.nextLine().split(" ");
//Traversing array, just to show the output
for(int i=0; i<input.length; i++)
System.out.println(input[i]);
}
}
//nextLine() <-- read a complete line
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run