java hashtable with collision resolution
<p>I want to get all the values(multiple) of a particular key.But i m getting only one value?I dont know how to print  all the values.Great help if someone correct the code..did not get any help from google search.. </p>

<pre><code>import java.util.*;


public class hashing
{
  public static void main(String args[])
  {
       String[] ary=new String[4];
       String key;
       char[] chrary;
       ary[0]=new String("abcdef");
       ary[1]=new String("defabc");
       ary[2]=new String("ghijkl");
       ary[3]=new String("jklghi");
       Hashtable&lt;String, String&gt; hasht = new Hashtable&lt;String, String&gt;(); 
       for(int i=0;i&lt;4;i++){
          chrary=ary[i].toCharArray();
          Arrays.sort(chrary);
          key=new String(chrary);
          hasht.put(key,ary[i]);
       }
       Enumeration iterator = hasht.elements();
    while(iterator.hasMoreElements()) {
      String temp = (String)iterator.nextElement();
      System.out.println(temp);
    }

 }
}
</code></pre>

<p><strong>PS:output is defabc jklghi.I want abcdef defabc ghijkl jklghi.</strong></p>
