import java.util.*; //We are importing the HashMap class from the util package!

public class HashMapTest
{
	public static void main(String[] args)
	{
		String s;
		Integer num;
		HashMap map=new HashMap(); //Create a new HashMap Object

		//Store a key-value pair in the map
		//The Key is a String "HelloMessage"
		//The Value is also a String "Hello World! This is my HashMap Test!"
		map.put("HelloMessage", "Hello World! This is my HashMap Test!");

		//Store a second key-value pair in the map
		//The Key is a Integer Object wrapping the int: 2
		//The Value is a String "TWO"
		num=new Integer(2);
		map.put(num, "TWO");

		//Let's store the reverse as well.
		//In this case the key is String "ONE"
		//And the value is Integer(1)...
		num=new Integer(1);
		map.put("ONE", num);


		//------------------------------------------------->


		//Retrieve the values from the map and print

		//The Number Integer
		num=(Integer)map.get("ONE");
		System.out.println(num);

		//The Number String
		num=new Integer(2);
		s=(String)map.get(num);
		System.out.println(s);

		//The Hello Message
		s=(String)map.get("HelloMessage");
		System.out.println(s);
	}
}
