Map aMap = new CaseInsensitiveMap(); aMap.put("A", "The letter A or a"); aMap.put("b", "The letter B or b"); System.out.println("aMap.get(\"a\") = " + aMap.get("a")); System.out.println("aMap.get(\"A\") = " + aMap.get("A")); System.out.println("aMap.get(\"b\") = " + aMap.get("b")); System.out.println("aMap.get(\"B\") = " + aMap.get("B"));
The results..
aMap.get("a") = The letter A or a aMap.get("A") = The letter A or a aMap.get("b") = The letter B or b aMap.get("B") = The letter B or bAuthor: Philip A Senger
No comments:
Post a Comment