Load array of strings from console

http‮w//:s‬ww.lautturi.com
Load array of strings from console
/**
 * @author lautturi.com 
 * Java example: get array of strings from console input
 */

import java.util.*;

public class Lautturi {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String[] words = scanner.nextLine().split(" ");
		
		for (String str : words) {
			System.out.println(str);
		}	
	}
}

output:

hello java world<enter>
hello
java
world
Created Time:2017-10-03 18:00:27  Author:lautturi