map中取出的string类型数据和integer类型的数据的顺序

他们都实现的object的hashcode方法,为什么从map中取出的integer类型的数据是有序的呢?
因为数值型的hash值是本身,所以是有序的.

猜你喜欢

转载自blog.csdn.net/weixin_47785112/article/details/109190722
今日推荐