foreach

Posts tagged foreach

WeakHashMap in Java

What is WeakHashMap WeakHashMap is based on Hash table implementation of the Map interface but with weak keys. An entry in a WeakHashMap will automatically be removed when…

LinkedHashMap in Java

What is LinkedHashMap A LinkedHashMap like HashMap is a simple yet powerful way to store and get data. Unlike HashMap, LinkedHashMap is based on HashTable and Linked list…

HashMap in Java

What is HashMap A HashMap is a simple yet powerful way to store and get data. HashMap is based on HashTable implementation, that implements the Map interface and…

ConcurrentHashMap in Java

Though we have thread-safe collections classes like HashTable, Synchronized Map, which can be used in multi-threaded environment but there are significant differences between them, which arise from the…