Map<String, Integer> mPair = new HashMap<String, Integer>();
mPair.put("one", new Integer(1));
mPair.put("two", new Integer(2));
mPair.put("three", new Integer(3));
System.out.println(mPair.values());
if (mPair.containsKey("two"))
System.out.println(mPair.get("two"));
No comments:
Post a Comment