I've been going through Java API java.util.HashMap
and java.util.Hashtable
I've understood the internal implementation of get(Key k)
and put(Key k, Value v)
methods of HashMap
, and Hashtable
seems almost same to me in terms of get(k)
and put(k,v)
method.
Please tell me does Hashtable internally work in the same way as it is in HashMap or differently?
I know other stuff about synchronization, default capacity and null key/values, but apart from these does it differ in terms of its internal implementation of get and put method.
I've already checked java source code for the mentioned class and also visited this link: Differences between HashMap and Hashtable? I'd like to know about the internal get and put method implementations of the classes.
Please share your knowledge. Thanks!