F
F
foonfyrick2021-02-04 07:30:20
Java
foonfyrick, 2021-02-04 07:30:20

LinkedHashMap vs HashMap what are the differences, what does changing the value of accesOrder give?

I read that the main difference is setting the boolean value accesOrder to the constructor, if the value is true, then
the get() method moves the element to the end of the map and returns a value, the order in which the elements are stored corresponds to the order they were added to the map, and what other differences or this all? For this class, I found only an article on Habré for 2012.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-02-04
@foonfyrick

The main difference is that the order in which elements are added is preserved. Everything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question