在map中根据value获取key
原文:http://blog.csdn.net/mexican_jacky/article/details/51789548
//根据map的value获取map的key private static String getKey(Map<String,String> map,String value){ String key=""; for (Map.Entry<String, String> entry : map.entrySet()) { if(value.equals(entry.getValue())){ key=entry.getKey(); } } return key; }
看完打开支付宝扫一扫领个红包吧!