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

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