1) Both HashMap and HashSet are a hash based collection in Java.
2) Both HashMap and HashSet are not synchronized and can not be shared between multiple threads.
3) Iterator returned by HashMap's keySet() and HashSet are fail-fast and they throw ConcurrentModificationException if they detect any structural change in Collection.
4) Both HashMap and HashSet provided constant time performance for basic operations like put(), get() etc.
5) Both HashSet and HashMap allows null values.