Join
Blogs
Questions
Videos
Tags
Members
Search
 
 
Create your own blog, earn points and get popular!

Java HashMap Example

  1. import java.util.HashMap;
  2.  
  3. public class HashMapExample{
  4.  
  5.     public static void main(String[] args) {
  6.  
  7.         HashMap myMap = new HashMap();
  8.  
  9.         map.put("1", "A");
  10.         map.put("2", "B");
  11.         map.put("3", "C");
  12.  
  13.         String one = (String) map.get("1");
  14.         System.out.println(one);
  15.     }
  16.  
  17. }

<< HashMap Operations
Your rating: None Average: 1.8 (5 votes)
Share this

Post new comment