Which collection type should you use?

You are developing an application that includes a class named Order. The application will store a collection of
Order objects.
The collection must meet the following requirements:
-Internally store a key and a value for each collection item. -Provide objects to Iterators in ascending order
based on the key. -Ensure that item are accessible by zero-based index or by key.
You need to use a collection type that meets the requirements.
Which collection type should you use?

You are developing an application that includes a class named Order. The application will store a collection of
Order objects.
The collection must meet the following requirements:
-Internally store a key and a value for each collection item. -Provide objects to Iterators in ascending order
based on the key. -Ensure that item are accessible by zero-based index or by key.
You need to use a collection type that meets the requirements.
Which collection type should you use?

A.
LinkedList

B.
Queue

C.
Array

D.
HashTable

E.
SortedList

Explanation:
imo Hashtable cannot be ordered. beacuase it’s hashtable



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Google

Google

That is the end of this article. Right here youll obtain some websites that we think youll value, just click the hyperlinks.

Google

Google

One of our guests not too long ago suggested the following website.

Ashraf

Ashraf

E

As SortedList Class Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.