basic questions

Map<String, Integer> map = new HashMap<String, Integer>();
map.put("1", 100);
if (map.containsKey(1)) {
System.out.println(map.get(1));
}
if (map.containsKey("1")) {
System.out.println("this one:" + map.get("1"));
}

 

Integer sx = null;
if (sx == 3) {
System.out.println("wrong");
}

posted on 2013-11-04 17:36  ukouryou  阅读(96)  评论(0编辑  收藏  举报

导航