3 ms·
A Java Hastable is threadsafe, and is documented to be so A Java HashMap is not threadsafe and is documented to be so, and can silently corrupt data, can go in
by noselasd 11y ago
A Java Hastable is threadsafe, and is documented to be so
A Java HashMap is not threadsafe and is documented to be so, and can silently corrupt data, can go into an infinite loop etc. if you mess with it from several threads.
Both leaves you with a lot of potential for races in application logic though.