How do I use StringTokenizer to split a string?


The code below is an example of using StringTokenizer to split a string. In the current JDK this class is discouraged to be used, use the String.split(...) method instead or using the new java.util.regex package.

Here is the result of this sample code:

Filed in: Java Util Package
© 9901 Java Examples - Built with love by Wayan Saryada.