Java examples for Collection Framework:TreeMap
Check if a particular value exists in TreeMap
import java.util.TreeMap; public class Main { public static void main(String[] args) { TreeMap treeMap = new TreeMap(); /*from w w w .j a va 2 s . c o m*/ treeMap.put("1","One"); treeMap.put("2","Two"); treeMap.put("3","Three"); boolean blnExists = treeMap.containsValue("Three"); System.out.println("Three exists in TreeMap ? : " + blnExists); } }