The Artima Developer Community
Sponsored Link

Java Answers Forum
help with some code

1 reply on 1 page. Most recent reply: Dec 13, 2002 1:53 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
ben

Posts: 57
Nickname: loftty
Registered: Oct, 2002

help with some code Posted: Dec 13, 2002 4:21 AM
Reply to this message Reply
Advertisement
hello everyone i hope someone can help me.
i want to be able to test 10 strings(some of the strings might have the same value) i want to be able test each string in turn with a loop though the hashtable. so for example if the hashtable equals string 1 extract the strings that do equal string 1 and put them inside a array list along with there key values, and then delete the ones that have been found to equal string 1, so that when i test again it will not find them again. then i want a loop to test the next string (string2) and do the same to that string and so on with the rest of the strings.
could someone please help me as my code does work but it is hard coded and i need some help please.
thanks for yr time.
loftty.


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: help with some code Posted: Dec 13, 2002 1:53 PM
Reply to this message Reply
I don't quite understand what you are trying to accomplish. Are you trying to take a list of strings and eliminate the duplicates? Just putting them (as the keys) into a Hashtable does that, since a Hashtable doesn't allow duplicates.

Flat View: This topic has 1 reply on 1 page
Topic: JSP PAGING Previous Topic   Next Topic Topic: Building Java Chat Serer in Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use