Title: Hashtable
The easiest, in my opinion, way is like this:
    (*Chris*)
 
String key;
Hashtable hash = (already created and filled up by somthing else with String keys for this example);
Enumeration enum = hash.keys();
while(enum.hasMoreElements()) {
  key = (String)enum.nextElement();
  System.out.println(key + " = \"" + hash.get(key) + '\"');
}
----- Original Message -----
Sent: Friday, August 13, 1999 8:45 AM
Subject: Hashtable

Hi all.

        How do I go trought all the Objects stored in a Hashtable.
With Vector it is easy by getting the size and looping with vector.elementAt(i) but
how can I do this with a Hashtable.


Thanks.

                      ,,                    Stephane DeCoeli Cote
                    `  >                  [EMAIL PROTECTED]
 ||                  ~                 ||
|||=oOOo=====oOOo=||| 
 ||             \  /||\  /            ||  
                  \/ || \/         
                     /\            

Reply via email to