fork download
  1.  
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. class tableKeys {
  8. public static void main(String a[]){
  9. Hashtable<String, String> hm = new Hashtable<String, String>();
  10. hm.put("first", "FIRST INSERTED");
  11. hm.put("second", "SECOND INSERTED");
  12. hm.put("third","THIRD INSERTED");
  13. System.out.println(hm);
  14. Set<String> keys = hm.keySet();
  15. for(String key: keys){
  16. System.out.println(key);
  17. }
  18. }
  19. }
Success #stdin #stdout 0.04s 4386816KB
stdin
Standard input is empty
stdout
{third=THIRD INSERTED, second=SECOND INSERTED, first=FIRST INSERTED}
third
second
first