| Author |
StringTokenizer does not work properly.
|
Rahul Ba
Ranch Hand
Joined: Oct 01, 2008
Posts: 203
|
|
I am having problem with code...
The output I am getting is:
strToken:24151
strToken:RS
strToken:EZT
but I am not expecting this output...I am expecting:::
strToken:24151
strToken:RS-EZT
Please let me know where I am wrong...
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
It's because the tokens "*" and "-" are used to delimit the strings. Use String#split instead (and be careful that "*" has a special meaning in regular expressions).
|
[My Blog]
All roads lead to JavaRanch
|
 |
 |
|
|
subject: StringTokenizer does not work properly.
|
|
|