阅读背景:

如何使用其键获取LinkedHashMap中键/值的位置

来源:互联网 

Hi I have a LinkedHashMap (called info) that contains name/age (string/int) pairs. I want to find out, how can I get the position of the key/value if i input the key. For example, if my LinkedHashMap looked like this {bob=12, jeremy=42, carly=21} and I was to search jeremy, it should return 1 as its in position 1. I was hoping I can use something like info.getIndex("jeremy")Hi I have a LinkedHashMap (called info) that co




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: