Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String Tokens

 
khizar dheen
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15214
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12098
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
khizar dheen
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now its looking neat....
 
Omar Mohaidat
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you want to get the tokens from your list, you already did that:



do you mean an exception appeared?
 
Aditya Kanitkar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic