Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hash table  RSS feed

 
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);
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!