java dictionary class code example
Example 1: java dictionary
Map<String, String> dictionary = new HashMap<String, String>();
dictionary.put("key", "value");
String value = dictionary.get("key");
Example 2: dictionary in java
Map<String, String> map = new HashMap<String, String>();
map.put("dog", "type of animal");
System.out.println(map.get("dog"));