fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. // your code goes here
  13. }
  14. }
  15.  
  16. interface DictionaryInterface <K extends Comparable<K>, V>
  17. {
  18. public void insert(K key, V value);
  19. public V getValue(K str);
  20. public void remove(K key);
  21. public K[] getKeys();
  22. }
  23.  
  24.  
  25. abstract class HashDictionary <K extends Comparable<K>, V> implements DictionaryInterface <K,V>{
  26. Hashtable<K,V> h;
  27. Class<K> KeyType;
  28. HashDictionary(Class<K> KeyType) {
  29. h=new Hashtable<K, V>();
  30. this.KeyType=KeyType;
  31. }
  32.  
  33. //@Override
  34. public void thisAintAMethodToBeOverriden()
  35. {
  36.  
  37. }
  38.  
  39. @Override
  40. public void remove(K key) {
  41. // TODO Auto-generated method stub
  42. h.remove(key);
  43. }
  44. }
Success #stdin #stdout 0.08s 380160KB
stdin
Standard input is empty
stdout
Standard output is empty