Just for others to make it work.. use one space before \t.
No, don't do this for the following reasons:
1. It isn't necessary. If you want to split on a tab then specifying \t works fine.
2. It's wrong. It will change the way the string splits from just splitting on tabs to splitting on both tabs and whitespace.
If you don't believe me run this code.
BTW you shouldn't use StringTokenizer, the API docs say "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."
I'm THIS CLOSE to ruling the world! Right after reading this tiny ad: