which one is performance wise advantageious from List,Set,Map?

Answer Posted / pkj

List : storing of data is fast but retrieval is slow.
Map : Stroing of data is slow. But retrieval is slow.
Set : Stroing of data is slow. But retrieval is slow.

Depending on the req the collection can be used

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a generic type?

551


FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?

2624


What is an empty string in css?

518


What is the difference between a vector & an array list?

667


Is 0 true or false in java?

513






Explain about instanceof operator in java?

598


What is the purpose of the return statement?

506


describe synchronization in respect to multithreading? : Java thread

491


Can we use switch statement with strings?

612


Can the garbage collection be forced by any means?

526


Can we catch more than one exception in a single catch block?

620


What are data types in oop?

542


What is an example of a conditional statement?

558


What is immutable in java?

534


Does java have a compiler?

551