
// Test put

public class Demo2
{
    public static void main(String[] args)
    {
       Dictionary<String,String> H = new HashTableOA<>(5);


       H.put("ice", "cold");
       H.put("fire", "hot");
       H.put("rock", "hard");
       H.put("wool", "soft");
       H.put("sun", "hot");

       System.out.println("\nInitial hash table:");
       System.out.println(H);


       System.out.println("\n*** Test remove(): ***");
       System.out.println("-- rock:" + H.remove("rock"));
       System.out.println(H);
       System.out.println("-- ice:" + H.remove("ice"));
       System.out.println(H);
       System.out.println("-- wool:" + H.remove("wool"));
       System.out.println(H);


       System.out.println("*** Test get(): ***");
       System.out.println("get(sun): " + H.get("sun"));
       System.out.println("get(fire): " + H.get("fire"));
       System.out.println("get(abc): " + H.get("abc"));

       System.out.println("Test put():");
       H.put("ice", "** cold **");
       System.out.println(H);
       H.put("sun", "** bright **");
       System.out.println(H);
       System.out.println("get(sun): " + H.get("sun"));
    }

}
