StringTokenizer in Java

In this tutorial, we will learn about StringTokenizer in Java. StringTokenizer in Java is a class which allows a String to break into tokens. This class is a legacy class that is retained for compatibility reasons. StringTokenizer implements the Enumeration interface. Therefore, given an input string, you can enumerate the individual tokens contained in it using StringTokenizer. StringTokenizer class provides a method nextToken( ) to extract consecutive tokens. To use StringTokenizer, specify an input string and a string that contains delimiters. Delimiters are characters that separate tokens. Each character in the delimiters string is…

Read More