Suppose you would like to create an instance of a new Map that has an iteration order

Question:

Suppose you would like to create an instance of a new Map that has an iteration order that is the same as the iteration order of an existing instance of a Map. Which concrete implementation of the Map interface should be used for the new instance?

(a) TreeMap

(b) HashMap

(c) LinkedHashMap

(d) The answer depends on the implementation of the existing instance.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: