HashMap | and LinkedHashMap CIP | Question 6

Last Updated :
Discuss
Comments

What is the syntax of creating a Hashmap in Java?

HashMap<k, v> map = new HashMap<>();

map<k, v> = new HashMap<>();

HashMap<k, v> map = new HashMap();

None of these

Share your thoughts in the comments