• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

StringTokenizer

Trying to do some io here.

What is StringTokenizer for and hasmoretokens etc?
How do i use them..examples?
0
jedistar
Asked:
jedistar
  • 2
1 Solution
 
objectsCommented:
its for breaking strings into tokens

http://javaalmanac.com/egs/java.util/ParseString.html
0
 
jedistarAuthor Commented:
thanks, how does it define the separater
0
 
ksivananthCommented:
String aString = "word1#word2#word3";
    StringTokenizer parser = new StringTokenizer(aString, "#"); //# is the delim here!
    while (parser.hasMoreTokens()) {
        processWord(parser.nextToken());
    }
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now