迭代器遍历Set的原理?

Set中对象是无序不可重复的,那么迭代器是怎么实现把游标指向下一个对象的?

诡圣
浏览 1945回答 3
3回答

慕的地8582982

DIISTHVVOEESGUSMASLVIDWIBCSHKUGKLFMWWDJXYHBUCYOXNOEYHZJUKWXDAEMFLCVBOOVJGYOCZCIFNHOVTGAVGJABXEXLHVCWSMRYDSBOIJSYRYIDDQKNJDSFFDNHSMGJIQMOBEBYHBSAZMMCHENXUIQGACBHEORJJHXAKKBOYTDUWILUCISJVMJRGWXXVGQJNBEKWDXCQXQHXPVWSWZVBBOWQARBBLLSYPFXUKKAAOFYBVYBUEFCFZIZMVUXQQAEHGQNCYSKUYLLOYFBUEXHXFVUWPYRNRBXQMCFMBORREKRDDKHPEFSSCSFYBFRNZVJTDGPCPJPICDTKWWJEMIHLSCQHKHHHNFTUGDTPGWOLOEAKQWDJGTGFQAHXNXNXDBXSPIYZMFGZVSSBMSKQAWWSBYIPFEKIZJRORMWFOXAXAWZISOLOKFWJSPRTWZCXHREOFIYGJTJFWZCRUDAXACXUOXVLVWSIENDKTJZPGCMOEHBDTISIFVYOLVXUKACZILHKAPGKUPLHQGDTOXIRTWFOYBSCKUXOKBPSOIFOLHQBRAWZJRALBWNQZPSBDSPLAXHCZCQSIFPSCEHKNFAJHQAJSIYAJLTVTDTWMKGKZOEHENPFIEUCRVRUXTPGJZOKTQADSIYBLHKGXHQTILQVROYVEGQGPZAQZCSBYDLHFUQFILVRNKNQUDTJLBDTJZQRMIFOJTPYVYOKTCFCMOJMWUKZIFIKGCNXTVRVZBENJMVYNDORNXAWTWXTCSWUDFPLBVRUKIEADSIFGIFOEOEAJGELTWSWGPYOXUKNDHXAQMBEVAPTPYOYTWGVNJGVSOYHCGQLHRHVFOXGJTMGRAWGPYBRHWFBEUQFIKFDXTXTWEGWFOS

迷醉

Hashset 它不保证集合的迭代顺序;特别是它不保证该顺序恒久不变

蒲公英wsg

无须是没有大小顺序;就像1,2,3,4,5,6;6,3,1,4,5,2;都是有顺序的,没具体研究过这个,里面可能是指针吧
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java