Programming Tips - Java: How do I use java.util.Scanner ?

Date: 2014apr1 Language: Java Keywords: token, tokenize Q. Java: How do I use java.util.Scanner ? A.
import java.util.Scanner; Scanner scan = new Scanner(sentence); while(scan.hasNext()) { String word = scan.next(); }