Guest User

Untitled

a guest
Jul 5th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public V remove(Object key){
  2. V old_value = get(key, entries);
  3. int place = compress(key, entries.length);
  4. while (place < entries.length) {
  5. if (entries[place] != null) {
  6. if (entries[place].getKey().equals(key)) {
  7. System.out.println("Removed the entry for key "+key);
  8. entries[place] = null;
  9. }
  10. }
  11. place++;
  12. }
  13. return old_value;
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment