标签: java
当我只想设置'if'语句时,这两个语句之间有什么区别吗?
// it is a HashMap if (map.keySet().contains(myKey)) { //do something...} if (map.containsKey(myKey)){ //do the same thing...}