Home » #arrays

#arrays

Collection

51 What is a weak HashMap?An implementation of the map interface, which includes only weak references to the keys. This allows garbage collection when the key is no longer referenced outside of the Map. 52. Why concurrentHashMap is not used over HashMap?This is because it doesn’t perform well in a multithreaded environment. 53. How to […]

Collection Read More »

Collection

11. Difference between Set and List?List is an ordered collection of elements and hence it maintains insertion order of elements while Set doesn’t maintain any ordering of the elements. List allows duplicate elements while Set doesn’t allow any elements. List is index-based, i.e.we can access elements in List based on Index, whereas we can’t access

Collection Read More »

Scroll to Top