- Map<String,String> map = new HashMap<String,String>();
- map.put("1", "a");
- map.put("2", "b");
- map.put("3", "c");
- map.put("4", "d");
- map.put("5", "e");
- Set set=map.entrySet();
- Iterator it=set.iterator();
- while(it.hasNext()) {
- Map.Entry entry=(Map.Entry)it.next();
- if(entry.getValue().equals("a")) {
- System.out.println(entry.getKey());
- }
- if(entry.getValue().equals("b")){
- System.out.println(entry.getKey());
- }
- if(entry.getValue().equals("c")){
- System.out.println(entry.getKey());
- }
- }
相关文章:
-
2022-12-23
-
2021-06-08
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2022-12-23
猜你喜欢
-
2022-12-23
-
2021-10-24
-
2022-02-14
-
2022-12-23
-
2022-12-23
相关资源
-
下载
2021-06-24
-
下载
2022-12-06
-
下载
2022-12-06