Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Create a HashMap


      // Creating an empty HashMap
      HashMap<Integer, String> hash_map = new HashMap<Integer, String>();
  
      // Mapping string values to int keys
      hash_map.put(10, "I");
      hash_map.put(15, "Love");
      hash_map.put(20, "ZOZO");
      hash_map.put(25, "❤");
  
       
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Create #HashMap
ADD COMMENT
Topic
Name
3+8 =