We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
It is much easier (and less code) to use the StringTokenizer class. Using Collections is overkill in this instance. You can easily set the delimeters in the constructor:
Java String Tokens
You are viewing a single comment's thread. Return to all comments →
It is much easier (and less code) to use the StringTokenizer class. Using Collections is overkill in this instance. You can easily set the delimeters in the constructor:
Then you can call the appropriate methods:
https://docs.oracle.com/javase/8/docs/api/java/util/StringTokenizer.html
Regards, Smyhk