how to use scanners in java

https:‮‬//www.lautturi.com
how to use scanners in java
/**
 * @author lautturi.com
 * Java example: get input from user using scanner in java
 */

import java.util.*;

public class Lautturi {

	public static void main(String[] args) {
		
		// get input from standard input stream
		Scanner scan = new Scanner(System.in);
      	System.out.println("Type something:");
      	String next = scan.next();// scanner will take the input
      	System.out.println(next);
      	
      	//String line = scan.nextLine();// scanner will take the whole line
      	//System.out.println(line);
		
	}
}

output:

Type something:
hello lautturi
hello
Created Time:2017-09-16 19:56:36  Author:lautturi