Gidday!
In the case of your delimiters,
JAVA treats every character in your delimiter
string as a separate delimiter. This means that '$' and 'a' are delimiters, but not "$a".
To get rid of the $-sign in your tokens, use the second one of your StringTokenizers, eg the one without true in the constructor. Here, true means that the delimiters are also returned as tokens (as you probably noticed)...
You can't have delimiters that are not chars.
If you want to store the tokens, consider whether you know for sure how many tokens the string will result in. If you do, use an ordinary array of String. If you don't, you might want to use a Vector or some other dynamic storage...
Hope this helps!
//Kaspar