[exploration of set classes in Java] 08 exploration of HashSet and TreeSet

User 8639654 2022-06-24 06:07:19 阅读数:564


what? Turned out to be HashMap Sheathed !HashMap Become the ultimate snake skin worker !

We know HashMap There are keys and values , But in HashSet The median is one , Namely Object

And in the HashMap The middle key will save only one copy , So it won't be repeated .

I want to see others TreeSet:

Solve the case again , Namely TreeMap The upper layer is covered with leather ...

Only this and nothing more , The introduction of the collection class is almost complete , I will also write a heap data structure . Later, it is possible to use things in the collection in the concurrent part ~

copyright:author[User 8639654],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/175/20210726162029199G.html