StringTokenizer input

Hey there, I normally use StringTokenizer(input) when i need a sentence tokenized. Now I need a whole file tokenized: blabla.txt. How do I put that in?MVG
[168 byte] By [whappita] at [2007-11-26 19:50:18]
# 1
what's wrong with loading the file and then tokenizing?
tjacobs01a at 2007-7-9 22:39:38 > top of Java-index,Java Essentials,New To Java...
# 2

You should replace StringTokenizer, deprecated class, by split() method of String if you want to split a sentence in parts or, generally, use java.util.Scanner to do. If you see StringTokenizer API documentation:

"StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the split method of String or the java.util.regex package instead."

You can see Scanner API documentation here:

http://java.sun.com/javase/6/docs/api/java/util/Scanner.html

govisagod512a at 2007-7-9 22:39:38 > top of Java-index,Java Essentials,New To Java...
# 3
Frankly speaking i am not pleased with the way RE has been implemented in java. I feel it would be a lot better if they had followed the implementation in lex.
qUesT_foR_knOwLeDgea at 2007-7-9 22:39:38 > top of Java-index,Java Essentials,New To Java...