simple Hashtable example in java

Below code demonstrate how to implement the Hashtable in java
Hashtable stores the key and value format

import java.util.*;
public class SimpleHashtableExample {

public static void main(String[] args) {

Hashtable hashtable = new Hashtable();

hashtable.put(“Device 1”, “iphone”);
hashtable.put(“Device 2”, “ipad”);
hashtable.put(“Device 3”, “Android”);
hashtable.put(“Device 4”, “BlackBerry”);

Object device = hashtable.get(“Device 3”);

System.out.println(“Value for the given key ==> “+device);
}
}

Output

Value for the given key ==> Android