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