Is it possible to get element from HashMap by its position?

后端 未结 14 1458
时光说笑
时光说笑 2020-12-12 18:31

How to retrieve an element from HashMap by its position, is it possible at all?

14条回答
  •  心在旅途
    2020-12-12 19:23

    HashMap has no concept of position so there is no way to get an object by position. Objects in Maps are set and get by keys.

提交回复
热议问题