Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hash table

 
kavins
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a file address.txt which has user id and address.I have parsed the file using string tokenizer as "*".
My question is how should i put the tokenized value in the hashtable so that if i give the user id as the i/p i should get the corresponding address.
My hashtable is "storer"
 
Sun LiWei
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while(hasMoreTokens)
storer.put(userid,ip);
String ip=(String)storer.get(userid);
 
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!