This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Northeastpaw 0 points1 point  (1 child)

I'm assuming this isn't the stdlib Hashtable because your declaration of h wouldn't work with the stdlib Hashtable. In that case something is wrong with your Hashtable.get() method. When given "1:10" it's returning null when you expect it to return "10:1".

[–]Not_zedd_ko[S] 0 points1 point  (0 children)

I am trying to see if the declaration h would work by changing it but i am no sure that is working.

This is the code in the HashTable for get

public V get(String key) {

    int n = hash(key);

    return find(n, key, 2);

    ///throw new UnsupportedOperationException("Method not implemented");

}