Java Programming - Objects and Collections - Discussion
Discussion Forum : Objects and Collections - General Questions (Q.No. 7)
7.
Which collection class allows you to associate its elements with key values, and allows you to retrieve objects in FIFO (first-in, first-out) sequence?
Answer: Option
Explanation:
LinkedHashMap is the collection class used for caching purposes. FIFO is another way to indicate caching behavior. To retrieve LinkedHashMap elements in cached order, use the values() method and iterate over the resultant collection.
Discussion:
2 comments Page 1 of 1.
Akbar said:
9 years ago
"FIFO is another way to indicate caching behavior".
What does FIFO has to do with caching behavior?
What does FIFO has to do with caching behavior?
Navya said:
9 years ago
I think the java.util.hashmap also the correct answer.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers