Please, read the documentation: https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#split(java.lang.String)
After this, it's easy to see why the following code works and why yours does not:
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
String line = new Scanner(System.in).nextLine();
String[] results = line.split(" ");
for (String result : results)
System.out.println(result);
}
}
If it's still not clear: String.split() returns an array of strings (the results of the split) and you have to iterate through them and print them one by one.