Java TreeMap Particular Key Exists Example
Chapter:
Collections
Last Updated:
13-05-2016 20:02:52 UTC
Program:
/* ............... START ............... */
import java.util.TreeMap;
public class JavaTreeMapKeyExists {
public static void main(String[] args) {
TreeMap<String, String> treeMap = new TreeMap<String, String>();
treeMap.put("1", "One");
treeMap.put("2", "Two");
treeMap.put("3", "Three");
System.out.println(treeMap.containsKey("1"));
}
}
/* ............... END ............... */
Output
Tags
Collection, TreeMap Particular Key Exists, Java