-
a problem with tokenizer
Dear friends,
the string tokenizer works with me well in the begining but how can i set the tokenizer to start processing another part if the code. see the code below :
String string = "Mike can not drive ";
.
System.out.println("\nthe token is :\n") ;
StringTokenizer stok = new StringTokenizer(string);
while (stok.hasMoreTokens())
{
System.out.println(stok.nextToken());
}
queue qu = new queue(stok.nextToken().length());
The problem is just with the last code. it seems that no tokens has been read. therfore, is there any method that read the tokens from the begining.
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks