scanner of Java class to learn the difference between the three, and stringtokenizer split wondered. I know, separate Then why bother to work only in the strings only with split stringtokenizer scanner when do they use?
split java java.util.scanner tokenizer
For now, the regular expression function has been added to the String class. In addition, J2SE 5.0 JavaDocs does not recommend further use of StringTokenizer.
StringTokenizer is not recommended for new code
Inheritance class held for compatibility reasons. The user who wants to use this feature is:
It is recommended to use the detach method of the String or the java.util.regex package.
These are the characteristics of the classes used for string separation, and StringTokenizer is no longer recommended, and if there is a reason to use Scanner for the same string separation, If you're using Scanner, it's useful if you want to separate strings while reading data from a file.
© 2024 OneMinuteCode. All rights reserved.