File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes String Tokens Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "String Tokens" Watch "String Tokens" New topic
Author

String Tokens

khizar dheen
Greenhorn

Joined: May 30, 2007
Posts: 13
I added list of tokens in my list,after that i want to iterate the list,then i need to get that string tokens in my iterate.....any suggestion welcome...

I need to take that string token again..any suggestion
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13870
    
  10

Welcome to JavaRanch.

Please UseCodeTags when you post source code. I've added them for you this time (I'm a moderator, so I can edit other user's posts).

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 10912
    
  12

I'm not sure what you are asking. Are you saying you need the String [] token once you exit your for loop, or are you saying that after you iterate through the list (and print), you want to iterate again?

or are you asking something else?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
khizar dheen
Greenhorn

Joined: May 30, 2007
Posts: 13
Hi Fred,
This is my scenerio
I am a reading a file and separated as tokens,and then i added that tokens into list,now i need separated tokens in my list on iterate..

Here i am attaching my code..


[ UD: In the future, please UseCodeTags when posting code of an length. It's unnecessarily hard to read the code as it is, making it less likely that people will bother to do so. ]
Aditya Kanitkar
Ranch Hand

Joined: Aug 08, 2009
Posts: 72
Now its looking neat....
Omar Mohaidat
Ranch Hand

Joined: Jan 16, 2008
Posts: 34
if you want to get the tokens from your list, you already did that:



do you mean an exception appeared?
Aditya Kanitkar
Ranch Hand

Joined: Aug 08, 2009
Posts: 72
Are you having the following pattern of contents in your file...???




If yes, then go ahead using this pattern...?? And explain your requirement....


If no , then put some sample data file of which you want to upload data....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String Tokens
 
Similar Threads
(Im)Proper Variable Declaration and Loop Variables
Collections,HashSet
Tokenizing string in Java
For-eaching an iterator
my inverted index not successfull