Solved

StringTokenizer

Posted on 2006-06-08
4
207 Views
Last Modified: 2010-03-31
Trying to do some io here.

What is StringTokenizer for and hasmoretokens etc?
How do i use them..examples?
0
Comment
Question by:jedistar
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 250 total points
ID: 16866737
its for breaking strings into tokens

http://javaalmanac.com/egs/java.util/ParseString.html
0
 

Author Comment

by:jedistar
ID: 16866774
thanks, how does it define the separater
0
 
LVL 92

Expert Comment

by:objects
ID: 16866785
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 16866812
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question