KeySet() and EntrySet() of Map in JAVA

Recently, Our company used Coverity to build and check the underlying bugs or issues. based on this point, Many Issues occured in report list, there was a bug about using keyset() to iterate Map, the report said that make ineffiecient keyset of iterator instead of entryset iterator,  After i consulted my collegue from USA. He said the best way is using the entryset to replace the keyset as substitute when iterating a Map. Looks Coverity became more and more smart bot.

你可能感兴趣的:(entrySet)