how to compare two hash maps?

后端 未结 7 1040
独厮守ぢ
独厮守ぢ 2021-02-08 02:22

How to compare the values in both hash maps with the help of keys ? Since the keys are identical whereas values are\'nt. and return boolean result for each key comparision. like

7条回答
  •  滥情空心
    2021-02-08 02:27

    I was directed here from this (possibly duplicate) question and was surprised to find that Google Guava wasn't mentioned in the answers.

    Instead of re-inventing the wheel, use the handy the Maps.difference method.

提交回复
热议问题