How to declare hashmap? | SoloLearn: Learn to code for FREE!

+1

How to declare hashmap?

7/25/2016 11:51:28 AM

Pooja

2 Answers

New Answer

+2

Map<Integer, String> myMap = new HashMap<Integer, String>();

+1

HashMap<value1, value2> name= new HashMap<value1, value2>(); value1 : key --> exmaple (int,string,double,..) value2 : value --> example (int,string,double,..)