Exercise
Hast Table - Dictionary
Objetive
Submit your dictionary here using a hash table.
Example Code
package TableHash;
import java.util.*;
public class Main
{
static void main(String[] args)
{
Hashtable myList = new Hashtable();
myList.put("white", "blanco");
myList.put("black", "negro");
System.out.println("The size is: " + myList.size());
System.out.println("Contenido:");
IDictionaryEnumerator miEnumerador = myList.entrySet().iterator();
while (miEnumerador.MoveNext())
{
System.out.printf("%1$s = %2$s" + "\r\n", miEnumerador.Key, miEnumerador.Value);
}
if (myList.containsKey("orange"))
{
System.out.println(myList.get("orange"));
}
}
}