Many text manipulation utilities require a tokenizer function which parses or breaks up the text into subunits called tokens based on specific delimiters or break characters. The most common delimiter is whitespace which yields words as the tokens. The String.split(string, reg_exp) method allows regular expressions to be used to define the delimiters. Java also provides several tokenizer classes including StringTokenizer for strings, StreamTokenizer for files, and Scanner class for files using regular expression delimiters. .....
http://home.cogeco.ca/~ve3ll/jatutor7.htm
http://home.cogeco.ca/~ve3ll/jatutor7.htm
Comments