Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / debapriya

See HasMap is used when u want to use key value pair
If u r storing Any Objects the better u write ur code for
hascode implementation ,the better the the retrieval process is

Set maintains order,each time u add a object ,it checks
whether it exists or not calling equals which in turn calls
the hashcode method(x.equals(y) means x.hashcode==y.hashcode)

List --->in case if u use Vector or ArrayList since both of
them implenets RandomAccessInterface so retrieval is faster
but addition or deletion is slower

LinkedList --->deletion or insertion is faster but does not
implemet RandomAccess interface

Is This Answer Correct ?    4 Yes 0 No

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

Answer / prashanth

list

Is This Answer Correct ?    2 Yes 0 No

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

Answer / kamala

MAP

Is This Answer Correct ?    2 Yes 0 No

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

Answer / r.jainrocks@gmail.com

hi Debapriya,

can u send me some more info on collection...

i.e.

In which kind of application Set is better
In which kind of application Map is better
In which kind of application List is better

just named those kind of applications

thanks in advance...

Is This Answer Correct ?    0 Yes 0 No

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

Answer / 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

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

Answer / anand

set

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Core Java Interview Questions

Is jdk required on each machine to run a java program?

0 Answers  


What is the difference between variable & constant?

0 Answers  


how to handle exceptions in ejb?

1 Answers   HCL,


Tell me how many ways are there to initialise an integer with a constant.

0 Answers   Aricent,


Explain the difference between call by refrence and call by value?

0 Answers  


What is the difference between class & object?

0 Answers  


What is the difference between pass by reference and pass by pointer?

0 Answers  


class a extends b { } class b extends a { } why java doesn't support cyclic pls explain me with example

3 Answers   Wipro,


Can we have static methods in an interface?

0 Answers  


Outline the major features of java.

0 Answers  


What is difference between printf and scanf?

0 Answers  


Explain the concept of proper inheritance?

0 Answers   Thomson Reuters, Virtusa,


Categories