Solved

StringTokenizer

Posted on 2006-06-08
4
204 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

861 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

Need Help in Real-Time?

Connect with top rated Experts

29 Experts available now in Live!

Get 1:1 Help Now