I was looking up the difference between the two classes and this point came up in a lot of the answers with this blog being the source: http://javarevisited.blogspot.com/2010/1
Fail-fast means when you try to modify the content when you are iterating thru it, it will fail and throw ConcurrentModificationException.
Set keys = hashMap.keySet();
for (Object key : keys) {
hashMap.put(someObject, someValue); //it will throw the ConcurrentModificationException here
}
For HashTable enumeration:
Enumeration keys = hashTable.keys();
while (keys.hasMoreElements()) {
hashTable.put(someKey, someValue); //this is ok
}