Since Map is an interface you need to instantiate a concrete implementation of the interface in order to use it. We can choose between the following Map implementations in the Java Collections API:
In my point of view, the most commonly used Map implementations are HashMap and TreeMap.Here are a few examples of how to create a Map instance:
Map m = new HashMap(); Map m = new TreeMap();
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc