![]() |
CodeWormTidbits of code and other items |
|
| [home] [java] |
How to use the StringTokenizer Class With an Array
When approaching a problem like this it's a good idea to go to the source. So, I went to Sun's documentation on the StringTokenizer Class. Some good sample code is given on Sun's webpage for the StringTokenizer. They have an example using the Split method from the String Class to do the same thing as the StringTokenizer Class. It is well worth checking out. Anyway, here is an example showing the collection created by the StringTokenizer Class placed into an array.
The output looks like the following:
|